[go: up one dir, main page]

CN101388210B - Coding and decoding method, coder and decoder - Google Patents

Coding and decoding method, coder and decoder Download PDF

Info

Publication number
CN101388210B
CN101388210B CN2007101539527A CN200710153952A CN101388210B CN 101388210 B CN101388210 B CN 101388210B CN 2007101539527 A CN2007101539527 A CN 2007101539527A CN 200710153952 A CN200710153952 A CN 200710153952A CN 101388210 B CN101388210 B CN 101388210B
Authority
CN
China
Prior art keywords
index
pulse
track
pulses
positions
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.)
Active
Application number
CN2007101539527A
Other languages
Chinese (zh)
Other versions
CN101388210A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to CN2007101539527A priority Critical patent/CN101388210B/en
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to PT141849299T priority patent/PT2827327T/en
Priority to EP14184929.9A priority patent/EP2827327B1/en
Priority to ES08734199.6T priority patent/ES2529292T3/en
Priority to DK14184929.9T priority patent/DK2827327T3/en
Priority to JP2010504431A priority patent/JP5221642B2/en
Priority to PCT/CN2008/070841 priority patent/WO2008134974A1/en
Priority to EP08734199.6A priority patent/EP2157573B1/en
Priority to ES14184929T priority patent/ES2817906T3/en
Publication of CN101388210A publication Critical patent/CN101388210A/en
Priority to US12/607,723 priority patent/US8294602B2/en
Application granted granted Critical
Publication of CN101388210B publication Critical patent/CN101388210B/en
Priority to US13/622,207 priority patent/US8988256B2/en
Priority to JP2013046027A priority patent/JP5866307B2/en
Priority to US14/617,585 priority patent/US9225354B2/en
Priority to US14/974,171 priority patent/US9444491B2/en
Priority to JP2016000105A priority patent/JP6239652B2/en
Priority to US15/228,661 priority patent/US9912350B2/en
Priority to US15/880,300 priority patent/US10153780B2/en
Priority to US16/184,240 priority patent/US10425102B2/en
Priority to US16/568,144 priority patent/US10666287B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

本发明公开了一种编码方法,对需要进行编码的脉冲按照脉冲的位置在轨道上的分布进行排序并编码。本发明还提供相应的解码方法,以及编解码器。研究实践证明,本发明提供的编码逻辑能够有效降低计算复杂度,同时由于按照排序进行编码,不同的脉冲分布情况对应连续的编码,能够尽可能的降低编码的冗余度,节省编码比特。

Figure 200710153952

The invention discloses an encoding method, which sorts and encodes the pulses to be encoded according to the distribution of the positions of the pulses on the track. The invention also provides a corresponding decoding method and a codec. Research practice has proved that the coding logic provided by the present invention can effectively reduce the computational complexity, and at the same time, because the coding is performed according to the sequence, different pulse distributions correspond to continuous coding, which can reduce the redundancy of coding as much as possible and save coding bits.

Figure 200710153952

Description

Coding and decoding method and coder and decoder
Technical Field
The invention relates to a coding and decoding method and a corresponding coder and decoder.
Background
In vector coding techniques, adaptive filtered residual signals are often quantized coded using an algebraic codebook. After the position and sign information of the optimal algebraic codebook pulse on the track are obtained through searching, a corresponding index value is obtained through coding calculation, so that a decoding end can reconstruct a pulse sequence according to the index value. On the premise of ensuring lossless reconstruction, bits required for encoding an index value are reduced as much as possible, and the method is one of main targets of research and development of an algebraic codebook pulse encoding method.
A specific encoding method adopted by the existing algebraic codebook pulse is described below by taking an example of a better encoding method in speech coding, namely an Adaptive Wideband-Rate Wideband (AMR _ WB +: Adaptive Multi-Rate Wideband) encoding method. According to different coding rates, 1 to N pulses can be coded on each track, and M is 2 in each trackmThe process of coding 1-6 pulses on each track in AMR _ WB + is described as follows:
coding 1 pulse per orbit
Since each track has 2mAnd therefore, the position index of the pulse on each track needs to be encoded with m bits, and the symbol index of the pulse needs to be encoded with 1 bit. The index value for encoding 1 signed pulse is:
I1p(m)=p+s×2m
wherein p ∈ [0, 2 ]m-1]Is the position index of the pulse; s is a sign index of the pulse, s is set to 0 when the sign of the pulse is positive, and s is set to 1 when the sign of the pulse is negative; i is1p∈[0,2m+1-1]。
The number of bits required to encode 1 pulse per track is: and m + 1.
② each orbit encodes 2 pulses
According to the results of (r), m +1 bits are required for encoding 1 pulse per track, and m bits are required for encoding a position index of another pulse, and since there is no particular requirement on the order of pulses, the sign of another pulse can be represented by the magnitude relation obtained by arranging the pulse position indexes. The index values for the 2 pulses encoded are:
I2p(m)=p1+I1p0×2m=p1+p0×2m+s×22m
wherein p0, p1 epsilon [0, 2 ]m-1]Position indexes of 2 pulses respectively; s is the sign index of the p0 pulse; the specific expression rule of the p1 pulse symbol is as follows: p0 < p1 indicates that the 2 pulses are of the same sign, and p0 > p1 indicates that the 2 pulses are of opposite sign; i is2p∈[0,22m+1-1]。
The number of bits required to encode 2 pulses per track is: 2m + 1.
Coding 3 pulses per track
Each track is divided into two parts: section A and Section B, each containing 2m-1And (4) a position. A part contains at least 2 pulses, and according to the result of (c), 2 x (m-1) +1 is 2m-1 bits are needed for encoding the part; the other pulse is searched on the whole track, and m +1 bits are needed according to the result of the first step; in addition, 1 bit is also required to indicate a portion containing 2 pulses. The index values for the 3 pulses encoded are:
I3p(m)=I2p(m-1)+k×22m-1+I1p(m)×22m
wherein k is the index of Section; i is3p∈[0,23m+1-1]。
The number of bits required to encode 3 pulses per track is: 3m + 1.
4 pulses per track code
Each track is divided into two parts: section A and Section B, each containing 2m-1And (4) a position. The combination of the number of pulses in each section is shown in the following table:
categories Number of pulses in Section A Number of pulses in Section B Number of bits required
0 0 4 4m-3
1 1 3 4m-2
2 2 2 4m-2
3 3 1 4m-2
4 4 0 4m-3
In the above table, the required bit number corresponding to each category is based on: for class 0 and class 4, a method like ③ is used in the portion with 4 pulses, except that the number of pulses for the whole search is 2, corresponding to I2p(m-2)+k×22m-3+I2p(m-1)×22m-2(ii) a For class 1, corresponding to I1p(m-1)+I3p(m-1)×2m(ii) a For class 2, corresponding to I2p(m-1)+I2p(m-1)×22m-1(ii) a For class 3, corresponding to I3p(m-1)+I1p(m-1)×23m-2
Regarding category 0 and category 4 as one possible case, and regarding categories 1 to 3 as one case, there are 4 cases in total, so that 2 bits are required to represent the corresponding cases, and 4m-2+2 to 4m bits are required for categories 1 to 3; in addition, in the case where the category 0 and the category 4 are included, it is necessary to distinguish between 1 bit, and therefore 4m-3+2+ 1-4 m bits are necessary for the category 0 and the category 4.
The number of bits required to encode 4 pulses per track is: 4 m.
Five, each track encodes 5 pulses
Each track is divided into two parts: section A and Section B, each containing 2m-1And (4) a position. Some part contains at least 3 pulses, and according to the result of (c), 3 x (m-1) +1 is 3m-2 bits for coding the part; searching the rest two pulses on the whole track, and according to the result of the second step, needing 2m +1 bits; in addition, 1 bit is needed toIndicating a portion containing 3 pulses. The index values for the 5 pulses encoded are:
I5p(m)=I3p(m-1)+k×23m-2+I1p(m)×23m-1
the number of bits required to encode 5 pulses per track is: 5 m.
Code 6 pulses per track
Each track is divided into two parts: section A and Section B, each containing 2m-1And (4) a position. The combination of the number of pulses in each section is shown in the following table:
categories Number of pulses in Section A Number of pulses in Section B Number of bits required
0 0 6 6m-5
1 1 5 6m-5
2 2 4 6m-5
3 3 3 6m-4
4 4 2 6m-5
5 5 1 6m-5
6 6 0 6m-5
In the above table, the basis of the required bit number corresponding to each category can be calculated according to the fourth calculation, and is not repeated.
Considering each of classes 0 and 6, classes 1 and 5, and classes 2 and 4 as one possible case, respectively, class 3 alone as one case, there are 4 cases in total, so 2 bits are needed to represent the corresponding cases, and 6m-4+ 2-6 m-2 bits are needed for class 3; for those cases that contain a merged class, 1 bit is needed to distinguish, so other classes than class 3 require 6m-5+2+ 1-6 m-2 bits.
The number of bits required to encode 6 pulses per track is: 6 m-2.
In the process of providing the present invention, the inventor finds that, in the algebraic pulse coding method provided by AMR _ WB +, a recursion-like coding logic is adopted, the case of a large number of coding pulses is split into a plurality of cases of a small number of coding pulses for processing, the calculation complexity is high, and meanwhile, as the number of coding pulses on a track increases, the redundancy of coding indexes is gradually accumulated, which easily causes the waste of coding bits.
Disclosure of Invention
The invention provides an encoding/decoding method and an encoding/decoding device which can effectively reduce the computational complexity and save encoding bits as much as possible.
An encoding method, comprising: counting the pulses to be coded on the track according to positions to obtain distribution information of the positions of the pulses on the track; determining a distribution index, wherein the distribution index is calculated according to the following mode: according to a set sequence, arranging all possible distribution situations of the positions of all pulses on the track under the current pulse number, and taking the arranged serial numbers as distribution indexes for indicating the corresponding distribution situations; and generating a coding index, wherein the coding index comprises the information of the distribution index.
A decoding method, comprising: receiving a coding index; extracting a distribution index from the coding index; determining the distribution of the positions of the pulses on the track according to the distribution index; the pulse sequence on the track is reconstructed according to the distribution of the positions of the individual pulses on the track.
An encoder, comprising: the first statistical unit is used for counting the pulses to be coded on the track according to positions to obtain distribution information of the positions of the pulses on the track; a distribution index unit, configured to determine a distribution index, where the distribution index is calculated as follows: according to a set sequence, arranging all possible distribution situations of the positions of all pulses on the track under the current pulse number, and taking the arranged serial numbers as distribution indexes for indicating the corresponding distribution situations; an index generating unit configured to generate a coding index, where the coding index includes information of the distribution index. .
A decoder, comprising: an input unit for receiving a coding index; a distribution extraction unit, configured to extract a distribution index from the coding indexes; the distribution decoding unit is used for determining the distribution of the positions of the pulses on the track according to the distribution index; a distribution reconstruction unit for reconstructing the pulse sequence on the track according to the distribution of the positions of the individual pulses on the track.
The technical scheme adopts a method of sequencing and coding the pulses to be coded according to the distribution of the positions of the pulses on the track; research practices prove that the scheme can effectively reduce the computational complexity, and meanwhile, because the encoding is carried out according to the sequence, different pulse distribution conditions correspond to continuous encoding, the encoding redundancy can be reduced as much as possible, and encoding bits are saved.
Drawings
FIG. 1 is a flow chart of an encoding method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a 5-pulse code index structure according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a 4-pulse code index structure according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a 3-pulse code index structure according to an embodiment of the present invention;
FIG. 5 shows a second embodiment of the present invention
Figure S2007101539527D00051
Of the hourA tree structure schematic diagram;
FIG. 6 is a flow chart of a third encoding method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a 6-pulse code index structure according to a third embodiment of the present invention;
FIG. 8 is a schematic diagram of a possible combination of SU (1) in the third embodiment of the present invention;
FIG. 9 is a schematic diagram of a possible combination of SU (2) in the third embodiment of the present invention;
FIG. 10 is a schematic diagram of a possible combination of SU (3) in the third embodiment of the present invention;
FIG. 11 is a schematic diagram of a possible combination of SU (4) in the third embodiment of the present invention;
FIG. 12 is a schematic diagram of a possible combination of SU (5) in the third embodiment of the present invention;
FIG. 13 is a schematic diagram of a possible combination of SU (6) in the third embodiment of the present invention;
FIG. 14 is a schematic diagram of a 5-pulse code index structure according to a third embodiment of the present invention;
FIG. 15 is a schematic diagram of a 4-pulse code index structure according to a third embodiment of the present invention;
FIG. 16 is a schematic diagram of a 3-pulse code index structure according to a third embodiment of the present invention;
FIG. 17 is a schematic diagram of a 2-pulse code index structure according to a third embodiment of the present invention;
FIG. 18 is a schematic diagram of a 1-pulse code index structure according to a third embodiment of the present invention;
fig. 19 is a schematic diagram of an x (N) tree structure when N is 2 in the fourth embodiment of the present invention;
fig. 20 is a schematic diagram of an x (N) tree structure when N is 3 in the fourth embodiment of the present invention;
FIG. 21 is a flow chart of a fifth decoding method according to an embodiment of the present invention;
FIG. 22 is a flowchart illustrating a seventh decoding method according to an embodiment of the present invention;
FIG. 23 is a schematic diagram of a logic structure of a nine-encoder according to an embodiment of the present invention;
FIG. 24 is a schematic diagram of the logic structure of a tenth encoder according to an embodiment of the present invention;
FIG. 25 is a schematic diagram of the logic structure of an eleventh decoder according to an embodiment of the present invention;
FIG. 26 is a logic structure diagram of a twelve decoder according to an embodiment of the present invention;
fig. 27 is a pulse search result diagram in the second application example of the third and seventh methods according to the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a coding method, which sequences and codes the pulses to be coded according to the distribution of the positions of the pulses on a track. The embodiment of the invention also provides a corresponding decoding method and a coder/decoder. The method and apparatus of the embodiments of the present invention are described in detail below.
In an embodiment, an encoding method, as shown in fig. 1, includes:
and A1, counting the pulse to be coded on the track according to the position, and obtaining the distribution information of the position of each pulse on the track.
The total number of pulses to be coded on the same track is generally determined according to the code rate, and it is obvious that the more the number of pulses to be coded is, the more the number of bits required for coding an index is, and the higher the code rate is. In the present context, it is intended that,
the total number of pulses to be encoded in the same track is denoted by pulse _ num, assuming that
Figure S2007101539527D00061
By distributing vectors in pulses
Figure S2007101539527D00062
Representing the distribution of the positions of the individual pulses on the track; wherein q (h) represents the position number of the h +1 th pulse on the track,
Figure S2007101539527D00063
Figure S2007101539527D00064
m herein denotes the total number of positions on the track, and in general M may be 8, 16, etc.
Furthermore, the pulses to be encoded may also have a sign, i.e. have a positive or negative characteristic, when the pulses to be encoded on the track are counted by position, and the information of the sign of the pulses of the respective pulses is obtained. In the present context, it is intended that,
by pulse symbol vectorPulse symbol information representing each pulse; wherein ss (h) represents the pulse symbol of the h +1 th pulse, which is called the symbol index of q (h) pulse, and based on whether the pulse symbol represented by ss (h) has positive or negative binary property, the following simple coding method can be generally adopted: positive pulses are denoted by ss (h) ═ 0, and negative pulses are denoted by ss (h) ═ 1. Of course, the pulse symbol is not necessarily the characteristic for the pulse to be encoded, and the pulse may have only the position and number characteristics according to the actual requirement, and in this case, the pulse symbol information does not need to be counted.
It is clear that,have a one-to-one correspondence.
In statistics obtainObtaining parameters of the pulse to be encoded
Figure S2007101539527D00071
Then, each parameter needs to be encoded into an index, and a corresponding relationship between the parameters and the index is established, so that the decoding party can recover the corresponding parameter according to the index. The corresponding relation can adopt two expression modes, one is a calculation relation expressed by an algebraic mode, under the condition, the encoding side carries out forward calculation on the parameter to obtain an index, and the decoding side carries out backward calculation on the index to obtain the parameter; the first is a query relationship expressed in a mapping manner, in this case, both the encoding and decoding sides need to store a mapping table of associated parameters and indexes. The two corresponding relations can be selected according to the specific characteristics of the parameters, generally speaking, under the condition of large data volume, the corresponding relation expressed by the calculation relation is designed as much as possible, so that the storage capacity of both encoding and decoding parties can be saved, and the method is more favorable. The encoding of each parameter will be described below.
A2, determining a distribution index I4, I4, and calculating according to the following method: according to the set sequence, counting the current pulse number
Figure S2007101539527D00072
Next, the positions of the respective pulses are arranged in all possible distribution situations on the track, and the arranged sequence numbers are used as distribution indexes I4 indicating the corresponding distribution situations.
The term "set order" means that the both encoding and decoding sides determine the order according to the same order calculation rule
Figure S2007101539527D00073
The order of all possible cases.
Vector of pulse distribution
Figure S2007101539527D00074
Is total possible number of
Figure S2007101539527D00075
Wherein,
Figure S2007101539527D00076
"C" indicates the number of combinations to be determined. Each I4 corresponds to an indication
Figure S2007101539527D00077
A pulse distribution condition of
In general terms, the term "water-soluble" is used to describe a mixture of water-soluble polymers and water-soluble polymers
Figure S2007101539527D00078
The data amount is large, so the correspondence with the distribution index I4 is suitable for the calculation relationship, and of course, the query relationship is also feasible. It is obvious that
Figure S2007101539527D00079
I.e. the total possible number of values of I4, if the value of I4 is counted from 0, then there is
A3, generating coding index
Figure S2007101539527D000711
Coding index
Figure S2007101539527D000712
Including the information of the distribution index I4.
The I4 may be placed into the code index in any manner that can be identified by the decoder, for example, in the simplest case, from a location in the code index that is set.
Of course, in the case where the encoded pulses are signed pulses,
Figure S2007101539527D000713
it is also necessary to include information on the symbol index ss (h) of each pulse, and to simply vector the pulse symbol
Figure S2007101539527D000714
As a length ofIs placed at a fixed location, e.g., the end, of the coded index.
In summary, the index is encoded
Figure S2007101539527D000716
Can be expressed as:
Figure S2007101539527D000717
it is to be understood that the above-mentioned exemplary code index configuration is only an optional manner of the present embodiment, and those skilled in the art can easily derive other configuration manners of the code index structure by using the basic information constituting the code index, for example, interchanging or recombining the index positions, etc., and the specific configuration manner of the code index does not limit the present invention.
To better understand the structure of the coding index in the first embodiment, some practical examples are given below for explanation. Assuming that the total number of positions M on the track is 16:
example one, encoding
Figure S2007101539527D00081
The structure of the coded index with the signed pulse is shown in fig. 2.
The code Index Index (5) has 19 bits in total, i.e., Index (5) is ∈ [0, 2 ]19-1]The range of code values for Index (5) in FIG. 2 is represented in hexadecimal form. Herein, before a value, the value is represented by "0 x" as a hexadecimal representation; other numerical values are not specifically stated and are all expressed in decimal notation.
The five symbol indices ss (0) to ss (4) occupy the last 5 bits.
In FIG. 2, 14 bits are used to place I4, so the coding space provided to I4 is 2 bits in length1416384, because WQ ( 5 ) = C 16 + 5 - 1 5 = 15504 , Obviously sufficient for use.
Example two, encoding
Figure S2007101539527D00083
The coded index structure with the signed pulse is shown in fig. 3.
The code Index Index (4) has 16 bits in total, i.e., Index (4) is ∈ [0, 2 ]16-1]。
The four symbol indices ss (0) to ss (3) occupy the last 4 bits.
In FIG. 3, 12 bits are used to place I4, so the coding space provided to I4 is 2 bits in length124096 because WQ ( 4 ) = C 16 + 4 - 1 4 = 3876 , Obviously sufficient for use.
Example three, encoding
Figure S2007101539527D00085
The structure of the coded index with the signed pulse is shown in fig. 4.
The code Index Index (3) has 13 bits in total, i.e., Index (3) is from [0, 2 ]13-1]。
The three symbol indices ss (0) to ss (2) occupy the last 3 bits.
In FIG. 4, 10 bits are used to place I4, so the length of the coding space provided to I4 is 2101024 because WQ ( 3 ) = C 16 + 3 - 1 3 = 816 , Obviously sufficient for use.
The second embodiment is an encoding method, which uses the same encoding logic as the first embodiment, and this embodiment mainly provides a method for calculating distribution index I4, so that it is convenient to determine the distribution of pulses on a track through algebraic calculation:
Figure S2007101539527D00087
correspondence to I4.
The following are provided in the present example
Figure S2007101539527D00088
The order calculation rule of (1):
due to the fact that
Figure S2007101539527D00091
The different cases are embodied by different numerical combinations contained in the same table, and therefore do not correspond to the same table
Figure S2007101539527D00092
The position numbers included in (1) are arranged so that:
Figure S2007101539527D00093
or
Wherein the equal sign indicates that the position of the pulse can be repeated; assuming the former is adopted, there are: q (0) belongs to [0, M ]],q(h)∈[q(h-1),M]And M is the total number of positions on the track. Then to
Figure S2007101539527D00095
Comparing the sizes of all dimensions in sequence under different conditions, and sequentially comparing all possible dimensions according to the sequence from small to large or from large to small
Figure S2007101539527D00096
And (6) sorting.
Suppose that a sorting mode from small to large is adopted and the sorted data is sorted from 0
Figure S2007101539527D00097
Numbering, then:
Figure S2007101539527D00098
wherein "C" represents the number of combinations; and Σ denotes summation. The meaning of the above formula can be interpreted as:
Figure S2007101539527D00099
indicating that the 1 st pulse precedes q (0)
Figure S2007101539527D000910
Total number of cases;
Figure S2007101539527D000911
when the 1 st pulse is located at q (0), the 2 nd pulse is located before q (1)
Figure S2007101539527D000912
Total number of cases;
Figure S2007101539527D000913
the meanings of (A) can be analogized. It should be noted that the above formulas are only I4 and
Figure S2007101539527D000914
one expression form of the inter-calculation relationship can equally describe the calculation relationship in other mathematical forms according to the same sequencing rule; if different ordering rules are adopted, similar calculation relationships can be correspondingly designed, and the expression mode of the specific calculation relationship does not limit the embodiment of the invention.
To better understand the above calculation method of I4, a pulse relative position vector can be assumed
Figure S2007101539527D000915
Figure S2007101539527D000916
Figure S2007101539527D000917
And
Figure S2007101539527D000918
there is a one-to-one correspondence as follows:
xx(1)=q(0);
xx(i)=q(i-1)-q(i-2);
xx (i) denotes a relative positional relationship between the position of the ith pulse and the position of the (i-1) th pulse,
Figure S2007101539527D000919
Figure S2007101539527D000920
by using
Figure S2007101539527D000921
Can be combined with
Figure S2007101539527D000922
All possible cases being constructed in one
Figure S2007101539527D000923
In the tree structure of the layer, the depth of the tree is
Figure S2007101539527D000924
The child nodes at the ith level of the tree represent the relative position values xx (i) of the ith pulse. Placing the values of xx (i) from left to right in a descending order, and then coding each tail node in the bottom layer of the tree, namely the tail node from left to right in sequence. Each end node to root node path corresponds
Figure S2007101539527D000925
So that the code of each end node indicates the corresponding
Figure S2007101539527D000926
The distribution index of the case I4.
As an actual example, assuming that the total number M of positions on the track is 16,the tree structure is shown in fig. 5, and the corresponding distribution index calculation formula is:
I 4 ( 3 ) = C 18 3 - C 18 - q ( 0 ) 3 + C 17 - q ( 0 ) 2 - C 17 - q ( 1 ) 2 + C 16 - q ( 1 ) 1 - C 16 - q ( 2 ) 1
others
Figure S2007101539527D00102
In the case of values, the corresponding tree structures are similar, and the calculation formula of I4 can be analogized and will not be described again.
The embodiment provides a method for obtaining the distribution index I4 in a calculation relationship, and since the data size of I4 in the coding index is large, the storage capacity of both the coding and decoding can be reduced as much as possible by using the calculation method of the embodiment. At the same time, since I4 is continuously encoded and compared with
Figure S2007101539527D00103
And the coding bits are strictly in one-to-one correspondence, so that the coding bits can be utilized to the maximum extent, and waste is avoided.
The third embodiment is a coding method, and the difference between the first embodiment and the second embodiment is that the coding process described in the first embodiment is regarded as the first coding mode, and the coding process is firstly selected from the selectable coding modes including the first coding mode, and then the coding process is performed according to the selected coding mode. The flow of the encoding method of this embodiment is shown in fig. 6, and includes:
b1, determining the total number of pulses to be encoded on the same track
Figure S2007101539527D00104
The total number of pulses to be coded can be determined according to the coding rate
Figure S2007101539527D00105
B2, according to
Figure S2007101539527D00106
Selecting a coding mode, wherein the coding mode comprises a first coding mode; and executing the step B3 or the step B4 according to the selection result.
The encoding scheme described in the first embodiment is referred to as a first encoding scheme herein. The alternative coding scheme may include other coding schemes, such as the conventional AMR _ WB +, in addition to the first coding scheme. In this embodiment, an optional second encoding manner is specifically provided.
The coding mode is determined according to
Figure S2007101539527D00107
The values are selected, e.g. some of them may be presetIn the case of values, the first coding mode is used for coding, while in the other cases
Figure S2007101539527D00109
Under the condition of valueAnd coding by adopting a second coding mode. The research shows that
Figure S2007101539527D001010
And in equivalence, the effect is better by adopting the first coding mode.
And B3, according to the result of the coding mode selection, after determining to select the first coding mode, coding according to the first coding mode.
The specific encoding process can be performed as described in the first embodiment.
B4, according to the result of the coding mode selection, after determining to select the second coding mode, coding according to the second coding mode, including the following steps:
and B41, counting the pulse to be coded on the track according to the position, and obtaining the number of the positions with the pulse, the distribution of the positions with the pulse on the track and the number of the pulses at each position with the pulse.
In the present context, it is intended that,
the number of positions with pulses is represented by pos _ num, since
Figure S2007101539527D00111
The distribution of the pulses on the track may have a position overlap, assuming pos _ num is N, obviously
Figure S2007101539527D00112
The distribution of pulsed positions on the track is denoted by a pulse position vector p (N) = { p (0), p (1) }; wherein p (N) represents the position number of the position with pulse on the track, N belongs to [0, N-1], p (N) belongs to [0, M-1], M represents the total number of positions on the track in this document, and M can be 8, 16, etc.;
the pulse number at each position having a pulse is represented by a pulse number vector su (N) { su (0), su (1) }; wherein su (n) represents the number of pulses at the p (n) positionTo the eye, obviously have
Figure S2007101539527D00113
Figure S2007101539527D00114
In addition, the pulses to be encoded may have signs, i.e. have positive or negative characteristics, and when the pulses to be encoded on the track are counted according to positions, it is also necessary to obtain the sign information of each pulse at the position (generally, the pulse signs of the pulses at the same position are the same, so that the sign information of the pulse at the position can be represented by the pulse sign information of the pulse position). In the present context, it is intended that,
expressing pulse symbol information of each pulse position by a position symbol vector s (N) { s (0), s (1) }; wherein, s (n) represents the pulse symbol of p (n) position, called as the symbol index of p (n) position, based on whether the pulse symbol represented by s (n) has positive or negative binary property, the following simple coding method can be adopted: a positive pulse is denoted by s (n) ═ 0, and a negative pulse is denoted by s (n) ═ 1. Of course, the pulse symbol is not necessarily the characteristic for the pulse to be encoded, and the pulse may have only the position and number characteristics according to the actual requirement, and in this case, the pulse symbol information does not need to be counted.
Obviously, the values in p (n), su (n), s (n) have a one-to-one correspondence.
After obtaining the parameters N, P (N), su (N), s (N) of the pulse to be encoded by statistics, the parameters need to be encoded into indexes, and the corresponding relationship between the parameters and the indexes is established, so that the decoding party can recover the corresponding parameters according to the indexes. The corresponding relation can adopt two expression modes, one is a calculation relation expressed by an algebraic mode, under the condition, the encoding side carries out forward calculation on the parameter to obtain an index, and the decoding side carries out backward calculation on the index to obtain the parameter; the first is a query relationship expressed in a mapping manner, in this case, both the encoding and decoding sides need to store a mapping table of associated parameters and indexes. The two corresponding relations can be selected according to the specific characteristics of the parameters, generally speaking, under the condition of large data volume, the corresponding relation expressed by the calculation relation is designed as much as possible, so that the storage capacity of both encoding and decoding parties can be saved, and the method is more favorable. The encoding of each parameter will be described below.
B42, determining a first index I1 according to the number of pulse positions pos _ num ═ N, where the first index I1 corresponds to the distribution of all possible pulse positions on the track for the same pos _ num.
The value N of pos _ num does not vary widely, so that it is feasible to use a calculation relationship or a query relationship corresponding to the first index I1. When the pos _ num is corresponding to the I1, the pos _ num and the I1 can generally have a one-to-one correspondence; of course, if the index of other parameters requires less bits for some pos _ num values, the pos _ num values can be combined with an I1 and distinguished by additional flag bits.
The value N of pos _ num determines the total number W (N) of all possible cases of P (N),"C" represents the number of combinations; thus one I1 corresponds to w (n) possible p (n).
B43, determining a second index I2 according to the distribution P (N) of the positions with pulses on the track, wherein the second index I2 indicates the distribution corresponding to the distribution of the positions with pulses at present from all possible distribution cases corresponding to the first index I1.
Total possible number of P (N) is W ( N ) = C M N , The data volume is large, so the corresponding comparison with the second index I2 is suitable for adopting the calculation relationship, of course, the inquiry is adoptedRelationships are also possible. Obviously, W (N) is the total possible value number of I2, if the value of I2 is counted from 0, I2 is equal to [0, W (N) -1]。
B44, determining a third index I3 according to the number of pulses su (n) at each position having pulses.
SU (N) is a vector of the same dimension as P (N), but is limited to
Figure S2007101539527D00123
And is
Figure S2007101539527D00125
The number of (c) is usually not large, and is generally 1 to 6, so that the total possible number of su (n) is not large, and it is feasible to adopt a calculation relationship or a query relationship with the third index I3. In addition, in view of the vector form, the query relationship is suitable under the condition of high dimension; the design of calculating the relationship under the low-dimensional condition is easier, and both modes can be adopted. It should be noted that in some extreme cases, for example, N ═ 1 or
Figure S2007101539527D00126
Su (n) at this time is only one possible case, not necessarily indicated by a specific I3, I3 can be considered as an arbitrary value that does not affect the final code index generation.
B45, generating coding index
Figure S2007101539527D00127
Coding index
Figure S2007101539527D00128
Including the information of the first, second and third indexes I1, I2 and I3.
I1, I2, I3 may be placed in the code index in any way that can be identified by the decoder, e.g., in the simplest case, each may be individually deposited in a fixed field. Considering that the total number of pulses pulse _ num required to be encoded on the same track is constant, the value N of pos _ num indicated by I1 determines the variation range of I2 and I3, that is, the number of encoding bits required by I2 and I3, so the encoding index can be constructed as follows:
overlapping information of other indexes by taking a first index I1 as a starting value; a value of I1 corresponds to an independent range of values of the code index; thus, the decoding party can directly determine the value N of pos _ num according to the value range of the coding index;
further, in the range defined by I1 (usually corresponding to a certain field length), I2 and I3 may be placed in any way that can be identified by the decoding party, for example, in the simplest case, they may be stored separately. Since I2 and I3 cannot be expressed as an integer power of 2 in general, in order to save coding bits as much as possible, I2 and I3 can be combined into the following form and placed in a value range defined by I1:
<math><mrow> <mi>I</mi> <mn>23</mn> <mo>=</mo> <mi>I</mi> <mn>3</mn> <mo>&times;</mo> <mi>W</mi> <mrow> <mo>(</mo> <mi>N</mi> <mo>)</mo> </mrow> <mo>+</mo> <mi>I</mi> <mn>2</mn> <mo>=</mo> <mi>I</mi> <mn>3</mn> <mo>&times;</mo> <msubsup> <mi>C</mi> <mi>M</mi> <mi>N</mi> </msubsup> <mo>+</mo> <mi>I</mi> <mn>2</mn> </mrow></math>
i2 and I3 both start encoding from 0, <math><mrow> <mi>I</mi> <mn>2</mn> <mo>&Element;</mo> <mo>[</mo> <mn>0</mn> <mo>,</mo> <msubsup> <mi>C</mi> <mi>M</mi> <mi>N</mi> </msubsup> <mo>-</mo> <mn>1</mn> <mo>]</mo> <mo>,</mo> </mrow></math> I3∈[0,Class(N)-1]and class (N) is the total possible number of SU (N). Obviously, this wayThe value range defined by I1 is divided into (N) parts with length W (N) of class, and each part corresponds to a distribution condition of SU (N).
③ of course, in the case where the coded pulses are signed pulses,it is also desirable to include information for each pulse symbol index s (N) that the position symbol vector s (N) can simply be placed as a field of length N at a fixed location, e.g., the end, of the code index.
In summary, the index is encoded
Figure S2007101539527D00134
Can be expressed as:
Figure S2007101539527D00135
it is to be understood that the above-mentioned exemplary code index configuration is only an optional manner of the present embodiment, and those skilled in the art can easily derive other configuration manners of the code index structure by using the basic information constituting the code index, for example, interchanging or recombining the index positions, etc., and the specific configuration manner of the code index does not limit the present invention.
The coding logic provided by the second coding mode can be uniformly adopted for different coding pulse numbers, so that the accumulation of coding index redundancy in a recursive mode adopted by AMR _ WB + is avoided, and the coding bits are fully utilized from the general logic concept. Meanwhile, as the multiple pulses at the same position are prevented from being coded respectively, the method for coding after position combination in the embodiment of the invention has the advantage of saving coding bits, and the probability of overlapping of pulse positions is increased along with the increase of the number of coding pulses on the track, so that the method in the embodiment of the invention has more obvious advantages.
In order to better understand the structure of the coding index in the second coding scheme, some practical examples will be described below. Assuming that the total number M of positions on the track is 16, and the number of pulse positions pos _ num corresponds to the first index I1:
example one, encoding
Figure S2007101539527D00141
The signed pulse, code index structure is shown in fig. 7.
The code Index Index (6) has 21 bits in total, i.e., Index (6) is from [0, 2 ]21-1]Fig. 7 shows the number of bits occupied by each part Index included in Index (6) in the case of different values of pos _ num. For clarity, the index with N at a particular value is denoted below by I1(N), I2(N), I3(N), and I23(N), respectively. The determination of I1(N) is performed in a mapping manner, respectively,
I1(1)=0x1F0000,I1(2)=0x1E0000,I1(3)=0x1D0000,
I1(4)=0x180000,I1(5)=0x000000,I1(6)=0x100000。
fig. 7 is explained in detail below.
When 6 pulses are at 1 position, N is 1, and possible combinations of SU (1) are shown in fig. 8;
W(1)=1 6,I2(1)∈[0,15],
SU(1)={6},Class(1)=1,I3(1)=0,
therefore, I23(1) ═ I2(1) ∈ [0, 15 ];
one symbol index s (0) occupies the last 1 bit,
i1(1) provides I23(1) with a coded space length of [2 ]21-I1(1)]/2132768, apparently sufficient.
When 6 pulses are in 2 positions, N is 2, and possible combinations of SU (2) are shown in fig. 9;
W(2)=120,I2(2)∈[0,119],
SU(2)={5,1},{4,2},{3,3},{2,4},{1,5};Class(2)=5,I3(2)∈[0,4],
thus I23(2) ═ I3(2) × 120+ I2(2) ∈ [0, 599 ];
the two symbol indices s (0), s (1) occupy the last 2 bits,
i2(2) provides I23(2) with a code space length of [ I1(1) -I1(2)]/2216384, obviously suffice.
③ 6 pulses at 3 positions, N equals 3, and SU (3) is shown in fig. 10;
W(3)=560,I2(3)∈[0,559],
SU(3)={4,1,1},{1,4,1},{1,1,4},{3,2,1},{3,1,2},{2,3,1},{2,1,3},{1,3,2},{1,2,3},{2,2,2};Class(3)=10,I3(3)∈[0,9],
thus I23(3) ═ I3(3) × 560+ I2(3) ∈ [0, 5599 ];
the three symbol indices s (0) to s (2) occupy the last 3 bits,
i2(3) provides I23(3) with a code space length of [ I1(2) -I1(3)]/238192, obviously sufficient.
When 6 pulses are in 4 positions, N is 4, and possible combinations of SU (4) are shown in fig. 11;
W(4)=1820,I2(4)∈[0,1819],
SU(4)={3,1,1,1},{1,3,1,1},{1,1,3,1},{1,1,1,3},{2,2,1,1},{2,1,2,1},{2,1,1,2},{1,2,2,1},{1,2,1,2},{1,1,2,2};Class(4)=10,I3(4)∈[0,9],
thus I23(4) ═ I3(4) × 1820+ I2(4) ∈ [0, 18199 ];
the four symbol indices s (0) to s (3) occupy the last 4 bits,
i2(4) provides I23(4) with a code space length of [ I1(3) -I1(4)]/2420480, obviously suffices.
When 6 pulses are in 5 positions, N is 5, and possible combinations of SU (5) are shown in fig. 12;
W(5)=4368,I2(5)∈[0,4367],
SU(5)={2,1,1,1,1},{1,2,1,1,1},{1,1,2,1,1},{1,1,1,2,1},{1,1,1,1,2};C1ass(5)=5,I3(5)∈[0,4],
thus I23(5) ═ I3(5) × 4368+ I2(5) ∈ [0, 21839 ];
the five symbol indices s (0) to s (4) occupy the last 5 bits,
i2(5) provides I23(5) with a code space length of [ I1(6) -I1(5)]/2532768, apparently sufficient.
Sixthly, when 6 pulses are at 6 positions, N is 6, and the possible combination of SU (6) is shown in FIG. 13;
W(6)=8008,I2(6)∈[0,8007],
SU(6)={1,1,1,1,1,1},Class(6)=1,I3(6)=0,
therefore, I23(6) ═ I2(6) ∈ [0, 8007 ];
the six symbol indices s (0) to s (5) occupy the last 6 bits,
i2(6) provides I23(6) with a code space length of [ I1(4) -I1(6)]/268192, obviously sufficient.
Example two, encoding
Figure S2007101539527D00161
The structure of the coded index with the signed pulse is shown in fig. 14.
The code Index Index (5) has 19 bits in total, i.e., Index (5) is ∈ [0, 2 ]19-1]. Fig. 14 shows the number of bits occupied by each part Index included in Index (5) in the case of different values of pos _ num. The determination of I1(N) is performed in a mapping manner, respectively,
I1(1)=0x78000,I1(2)=0x70000,I1(3)=0x60000,
I1(4)=0x40000,I1(5)=0x00000。
the detailed analysis of fig. 14 can be performed in accordance with fig. 7, and will not be described herein.
Example three, encodingThe structure of the coded index with the signed pulse is shown in fig. 15.
The code Index Index (4) has 16 bits in total, i.e., Index (4) is ∈ [0, 2 ]16-1]. Fig. 15 shows the number of bits occupied by each partial Index included in Index (4) when pos _ num has different values. The determination of I1(N) is performed in a mapping manner, respectively,
I1(1)=0xE000,I1(2)=0xC000,I1(3)=0x8000,I1(4)=0x0000。
the detailed analysis of fig. 15 can be performed in accordance with fig. 7, and will not be described herein.
Example four, encoding
Figure S2007101539527D00163
The structure of the coded index with the signed pulse is shown in fig. 16.
The code Index Index (3) has 13 bits in total, i.e., Index (3) is from [0, 2 ]13-1]. FIG. 16 is a table of respectiveThe number of bits occupied by each part Index contained in Index (3) is shown in the case of different values of pos _ num. The determination of I1(N) is performed in a mapping manner, respectively,
I1(1)=0x1C00,I1(2)=0x1800,I1(3)=0x0000。
the detailed analysis of fig. 16 can be performed in accordance with fig. 7, and will not be described herein.
Example five, encoding
Figure S2007101539527D00164
The structure of the coded index with the signed pulse is shown in fig. 17.
The code Index Index (2) has 9 bits in total, i.e., Index (2) is from [0, 2 ]9-1]. Fig. 17 shows the number of bits occupied by each partial Index included in Index (2) when pos _ num is different. The determination of I1(N) is performed in a mapping manner, respectively,
I1(1)=0x1E0,I1(2)=0x000。
the detailed analysis of fig. 17 can be performed in accordance with fig. 7, and will not be described herein.
Example six, encoding
Figure S2007101539527D00171
The structure of the coded index with the signed pulse is shown in fig. 18.
The code Index Index (1) has 5 bits in total, i.e., Index (1) is from [0, 2 ]5-1]. Since N ≡ 1, in fig. 18, Index (2) includes only Index I23(1) ═ I2(1), and symbol Index s (0) of p (0).
The fourth embodiment is an encoding method, which uses the same encoding logic as the third embodiment, and the present embodiment mainly provides a method for calculating the second index I2 in the second encoding manner, so that the distribution of pulse positions on the track can be conveniently determined by algebraic calculation: p (N) } is the correspondence of I2 with { p (0), p (1).
In the calculation method of I2 in this embodiment, all possible cases of p (N) in the number N of pulse positions corresponding to the first index I1 are arranged in a set order, and the arranged sequence number is used as the second index I2 indicating the corresponding distribution case.
The "set order" is understood to mean the order of all possible cases of p (n) determined by both the codec according to the same order calculation rule. In this embodiment, the following order calculation rule is provided:
since the different conditions of p (n) are represented by different combinations of values contained in p (n), the position numbers contained in p (n) are not arranged, so that:
p (0) < p (1) <. < p (N-1), or p (0) > p (1) > p (N-1);
assuming the former is adopted, there are: p (0) is belonged to [0, M-N ], p (N) is belonged to [ p (N-1) +1, M-N + N ], and M is the total number of positions on the track. And then comparing the sizes of all dimensions in sequence for different cases of P (N), and sequencing all possible P (N) according to the sequence from small to large or from large to small.
Assuming that a sorting mode from small to large is adopted and the sorted P (N) is numbered from 0, then:
<math><mrow> <mi>I</mi> <mn>2</mn> <mo>=</mo> <msubsup> <mi>C</mi> <mi>M</mi> <mi>N</mi> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mn>0</mn> <mo>)</mo> </mrow> </mrow> <mi>N</mi> </msubsup> <mo>+</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <mo>[</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>-</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>-</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>n</mi> </mrow> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>n</mi> </mrow> </msubsup> <mo>]</mo> </mrow></math>
wherein "C" represents the number of combinations; and Σ denotes summation. The meaning of the above formula can be interpreted as: cM N-CM-p(0) NRepresents the total number of P (N) cases in which the 1 st pulse precedes p (0); cM-p(0)-1 N-1-CM-p(1) N-1Represents the total number of cases P (N) that the 2 nd pulse is before p (1) when the 1 st pulse is at p (0); cM-p(n-1)-1 N-n-CM-p(n) N-nThe meanings of (A) can be analogized. It should be noted that the above formula is only one expression of the calculation relationship between I2 and p (n), and the calculation relationship can be equivalently described in other mathematical forms according to the same sorting rule; if different ordering rules are adopted, similar calculation relationships can be correspondingly designed, and the expression mode of the specific calculation relationship does not limit the embodiment of the invention.
To better understand the above calculation method of I2, it is assumed that a pulse relative position vector x (n) { x (1), x (2),.., x (n) }, x (n) and p (n) have the following one-to-one correspondence relationship:
x(1)=p(0);
x(i)=p(i-1)-p(i-2);
x (i) represents the relative position relationship between the ith pulse position and the (i-1) th pulse position, i ∈ [1, N ]. All possible cases P (N) can be constructed in an N-level tree structure by using X (N), the depth of the tree is N +1, and the sub-node of the ith level of the tree represents the relative position value x (i) of the ith pulse position. And (3) placing the values of x (i) from left to right in a descending order, and then coding each tail node in the bottom layer of the tree, namely the tail node from left to right in sequence. Each end node to root node path corresponds to a case of x (n), and thus the encoding of each end node is the second index I2 indicating the corresponding case of p (n).
In the following description, a practical example is given, and it is assumed that the total number M of positions on the track is 16.
For example, if the number of pulse positions pos _ num has a value N of 2, the tree structure is as shown in fig. 19.
I 2 ( 2 ) = C 16 2 - C 16 - x ( 1 ) 2 + C 16 - x ( 1 ) - 1 1 - C 16 - [ x ( 1 ) + x ( 2 ) ] 1
= C 16 2 - C 16 - p ( 0 ) 2 + C 16 - p ( 0 ) - 1 1 - C 16 - p ( 1 ) 1
Example two, the value N of the number of pulse positions pos _ num is 3, and the tree structure is shown in fig. 20.
I 2 ( 3 ) = C 16 3 - C 16 - x ( 1 ) 3 + C 16 - x ( 1 ) - 1 2 - C 16 - [ x ( 1 ) + x ( 2 ) ] 2
+ C 16 - [ x ( 1 ) + x ( 2 ) ] - 1 1 - C 16 - [ x ( 1 ) + x ( 2 ) + x ( 3 ) ] 1
= C 16 3 - C 16 - p ( 0 ) 3 + C 16 - p ( 0 ) - 1 2 - C 16 - p ( 1 ) 2 + C 16 - p ( 1 ) - 1 1 - C 16 - p ( 2 ) 1
When N is 4, 5, and 6, the corresponding tree structures are similar, and the calculation formula of I2 can be analogized, which is not described again.
The embodiment provides a method for obtaining the second index I2 in a calculation relationship, and since the data size occupied by I2 in the coding index is large, the storage capacity of both the coding and decoding can be reduced as much as possible by adopting the calculation method of the embodiment. Meanwhile, since I2 is continuously coded and strictly corresponds to P (N) one to one, the coded bits can be utilized to the maximum extent, and waste is avoided.
Next, the advantages of the coding index structure method in the first coding method and the second coding method are analyzed. Theoretically, on the premise that the total number of pulses _ num to be coded on the same track is fixed, all possible permutation combination numbers of all pulses on the track are the minimum value range of the code index, so that the corresponding coding bit number is the theoretical lower limit value, when the permutation combination number is an integer power of 2, the theoretical lower limit value of the coding bit number is an integer, and when the permutation combination number cannot be expressed as the integer power of 2, the theoretical lower limit value of the coding bit number is a decimal, and at this time, certain coding redundancy exists. When the total number M of positions on the track is 16, under different values of pulse _ num, comparing the theoretical lower limit of the coding bit number, the coding bit number required by using the AMR _ WB + coding scheme, and the bit number required by using the coding index structure scheme in the first coding scheme and the second coding scheme, as shown in table 1:
TABLE 1
Figure S2007101539527D00191
As can be seen from the comparison in table 1, the code index structure of the second coding scheme can reach the theoretical lower limit when the theoretical lower limit is an integer; when the theoretical lower limit value is decimal, the integer part reaching the theoretical lower limit value is increased by one. The first coding mode isAnd has the same code bit length as the second coding method. Under the condition of high code rate, the coding efficiency of the two coding modes is higher than that of AMR _ WB +, namely, more bits are saved.
In terms of computational complexity, all test sequences in the reference code of the AVS-M mobile audio standard are used as test objects, and the running time statistics of AMR _ WB +, the first coding mode and the second coding mode are compared (traversing all sample spaces, including the encoding and decoding processes, the first coding mode adopts the computing mode in the second embodiment, the second coding mode adopts the computing mode in the fourth embodiment, and the decoding mode adopts the corresponding mode provided in the subsequent embodiment), as shown in table 2:
TABLE 2
As can be seen from the comparison in table 2, the first encoding scheme has a lower operation complexity in most cases, and the second encoding scheme has an operation complexity equivalent to that of the AMR _ WB + scheme. As can be seen from tables 1 and 2, the first coding scheme and the second coding scheme are used in combination
Figure S2007101539527D00202
The low computational complexity of the first coding scheme is utilized, among othersA good effect can be achieved with a low coded bit length of the second coding scheme under the value condition.
The decoding method according to the embodiment of the present invention will be described in detail below.
An embodiment five is a decoding method, where the decoding method provided in this embodiment decodes the coded index obtained according to the coding method in the embodiment one, and a decoding process is an inverse process of the coding process, as shown in fig. 21, and includes:
c1, receiving coding index
Figure S2007101539527D00204
C2, indexing from code
Figure S2007101539527D00205
The distribution index I4 is extracted.
From
Figure S2007101539527D00206
The distribution index I4 can be extracted, and I4 can be constructed intoThe reverse process is performed. For example, if I4 stores the set field, it is only necessary to extract it directly.
If signed pulses are encoded, then the coded pulses are also encoded
Figure S2007101539527D00208
The symbol index ss (h) corresponding to each pulse is extracted. Because the total bit number of the coded index is different under different code rates, the decoding party can directly determine the total number of the coded pulses on the same track according to the length (bit number) of the coded index
Figure S2007101539527D00209
Then according to
Figure S2007101539527D002010
From
Figure S2007101539527D002011
Extracts a corresponding number of symbol indices ss (h). According to the first embodiment
Figure S2007101539527D00211
In the structure of the utility model, the utility model has the advantages of simple structure,
Figure S2007101539527D00212
a symbol index is located at
Figure S2007101539527D00213
At the end, therefore, can be directly driven from
Figure S2007101539527D00214
In (c) isolating each ss (h).
C3 determining the distribution of the positions of the individual pulses on the track according to the distribution index I4
Figure S2007101539527D00215
The decoding I4 adopts a process reverse to the encoding I4, and if I4 is obtained by adopting a calculation relation during encoding, the same calculation relation is used for carrying out inverse operation during decoding; if the I4 is obtained by using a query relationship during encoding, the same correspondence relationship may be queried during decoding.
C4 distribution on track according to position of each pulse
Figure S2007101539527D00216
The pulse sequence on the track is reconstructed.
In the case of signed pulses, when reconstructing the pulse sequence on the track, the positive or negative characteristic of the pulse sign of each pulse is also recovered according to the pulse sign information carried by each symbol index ss (h).
Sixth embodiment, a decoding method, the present embodiment uses the same decoding logic as the fifth embodiment, and the present embodiment mainly provides a calculation method for decoding the distribution index I4 obtained according to the encoding method of the second embodiment, that is, provides an inverse calculation method of the calculation method of I4 in the second embodiment on the decoding side.
For coding, according to the following:
<math><mrow> <mi>I</mi> <mn>4</mn> <mo>=</mo> <msubsup> <mi>C</mi> <mi>PPT</mi> <mi>N</mi> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>PPT</mi> <mo>-</mo> <mi>q</mi> <mrow> <mo>(</mo> <mn>0</mn> <mo>)</mo> </mrow> </mrow> <mi>N</mi> </msubsup> <mo>+</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <mo>[</mo> <msubsup> <mi>C</mi> <mrow> <mi>PPT</mi> <mo>-</mo> <mi>h</mi> <mo>-</mo> <mi>q</mi> <mrow> <mo>(</mo> <mi>h</mi> <mo>-</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>h</mi> </mrow> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>PPT</mi> <mo>-</mo> <mi>h</mi> <mo>-</mo> <mi>q</mi> <mrow> <mo>(</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>h</mi> </mrow> </msubsup> <mo>]</mo> </mrow></math> the resulting I4, when decoded, used:
calculating q (0) from small to large in sequence
Figure S2007101539527D00218
Wherein q (0) ∈ [0, M >]M is the total number of positions on the track,
Figure S2007101539527D00219
the total number of pulses encoded on the same track,"C" represents the number of combinations; record the last order T [ q (0)]The q (0) value larger than zero is used as the position serial number v0 of the 1 st pulse on the track;
② if
Figure S2007101539527D002111
Then continue to calculate in order from small to large q (1)
Figure S2007101539527D002112
Wherein q (1) ∈ [ v0, M](ii) a Record the last order T1[ q (1)]The q (1) value greater than zero is used as the position serial number v1 of the 2 nd pulse on the track;
thirdly, by analogy, calculating according to the sequence of q (h) from small to large
Figure S2007101539527D002114
Figure S2007101539527D002115
Wherein q (h) epsilon [ v (h-1), M],
Figure S2007101539527D002116
Record the last line Th [ q (h)]The value of q (h) greater than zero is used as the position index vh of the h +1 th pulse on the track.
Decoding I4 to obtain
Figure S2007101539527D002117
An embodiment seven is a decoding method, where the decoding method provided in this embodiment decodes the coded index obtained according to the coding method in the embodiment three, and a decoding process is an inverse process of the coding process, as shown in fig. 22, and includes:
d1, determining received code index
Figure S2007101539527D00221
Total number of pulses encoded on the same track
Figure S2007101539527D00222
The decoding method can directly depend on the length of the coding indexDegree (number of bits) determining the total number of pulses encoded on the same track
Figure S2007101539527D00223
Of course, the decoding party can also know the corresponding code index before receiving the code index by the method appointed by the encoding party
Figure S2007101539527D00224
Value (e.g., known by mutual information between two parties before receiving the code index), the embodiment is right
Figure S2007101539527D00225
The specific manner of learning is not limiting.
D2, according to
Figure S2007101539527D00226
Selecting a decoding mode, wherein the decoding mode comprises a first decoding mode; and executing the step D3 or the step D4 according to the selection result.
The decoding manner described in the fifth embodiment is referred to as a first decoding manner herein. The optional decoding method may include other decoding methods besides the first decoding method, and various optional decoding methods need to correspond to the encoding method provided by the encoding party. In this embodiment, a second decoding method corresponding to the second encoding method is specifically provided.
The decoding party adopts the rule corresponding to the encoding party to select the decoding mode, and the consistency of the encoding and decoding modes is ensured.
And D3, according to the result of the decoding mode selection, after determining to select the first decoding mode, decoding according to the first decoding mode. And executing the step of extracting the distribution index from the coding index.
The specific decoding process can be performed as described in embodiment five.
D4, according to the result of decoding mode selection, after determining to select the second decoding mode, decoding according to the second decoding mode, including the following steps:
d41, from
Figure S2007101539527D00227
The first index I1 is extracted, and the number of positions pos _ num with pulses is determined according to I1.
Because the total bit number of the coded index is different under different code rates, the decoding party can directly determine the total number of the coded pulses on the same track according to the length (bit number) of the coded index
Figure S2007101539527D00228
FromThe information of each index is extracted, and each index can be combined with the information of each index during coding
Figure S2007101539527D002210
The reverse process is performed. For example, if the indexes are stored in fixed fields separately, the indexes may be extracted separately.
If it is
Figure S2007101539527D00231
With the structure provided in the third embodiment in which I1 is used as the start value to superimpose other indexes, I1 can be extracted first, and the other indexes are determined to be in the pos _ num value N corresponding to I1Of (c) is used. In this case, since one I1 corresponds to
Figure S2007101539527D00233
Therefore, the decoding side can judge from a plurality of set independent value ranges
Figure S2007101539527D00234
And determining a first index I1 according to the initial value corresponding to the belonged value range.
D42, indexing from code
Figure S2007101539527D00235
Extracting second and third indexes I2 and I3;
similar to I1, the extracts of I2 and I3 are also combined into
Figure S2007101539527D00236
The reverse process is carried out, and can be directly extracted when independently placed. If the coding mode of combining and then overlapping in the third embodiment is adopted for I2 and I3, the following steps can be adopted for separation:
coding index
Figure S2007101539527D00237
Extracting a combined value I23 of I2 and I3;
i23 is inThe storage position of (a) may be indicated by the value of N determined by I1.
② I2 and I3 are separated in the following way,
I2=I23%W(N),I3=Int[I23/W(N)];
wherein w (N) is the total number of all possible cases of pos _ num ═ N, p (N), W ( N ) = C M N , m is the total number of positions on the track; % represents the remainder; int denotes rounding.
D43, if the coded pulse is signed pulse, it needs to be selected from
Figure S2007101539527D002310
The symbol index s (n) corresponding to each pulse position is extracted.
As provided in example three
Figure S2007101539527D002311
Structure, N symbol indexes are located at
Figure S2007101539527D002312
End, and thus may be directly accessed after obtaining the value of N indicated by I1
Figure S2007101539527D002313
In (c) isolating each s (n).
D44, determined by the second index I2, having a distribution p (N) of pulse positions on the track at pos _ num ═ N;
the decoding I2 adopts a process reverse to the encoding I2, and if I2 is obtained by adopting a calculation relation during encoding, the same calculation relation is used for carrying out inverse operation during decoding; if the I2 is obtained by using a query relationship during encoding, the same correspondence relationship may be queried during decoding.
D45, determining the pulse number SU (N) of each pulse position according to a third index I3; the principle of decoding I3 is similar to I2.
D46, reconstructing the pulse sequence on the track according to the distribution p (n) of the positions with pulses on the track and the number su (n) of pulses at each position with pulses.
In the case of signed pulses, when reconstructing the pulse sequence on the track, the positive or negative characteristic of each pulse symbol with a pulse position is recovered according to the pulse symbol information carried by each symbol index s (n).
An eighth embodiment of the present invention is a decoding method, and the present embodiment adopts the same decoding logic as the seventh embodiment, and the present embodiment mainly provides a calculation method for decoding the second index I2 obtained according to the encoding method of the fourth embodiment in the second decoding manner, that is, provides an inverse calculation method on the decoding side of the calculation method of I2 in the fourth embodiment.
For when coding, according to <math><mrow> <mi>I</mi> <mn>2</mn> <mo>=</mo> <msubsup> <mi>C</mi> <mi>M</mi> <mi>N</mi> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mn>0</mn> <mo>)</mo> </mrow> </mrow> <mi>N</mi> </msubsup> <mo>+</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <mo>[</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>-</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>-</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>n</mi> </mrow> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>n</mi> </mrow> </msubsup> <mo>]</mo> </mrow></math> The resulting I2, when decoded, used:
(ii) subtracting C from I2 one by oneM-1 N-1,...,CM-y0 N-1
R ( y 0 ) = I 2 - C M - 1 N - 1 - . . . - C M - y 0 N - 1 ;
The remainder R (y0) until I2 changes from positive to negative; wherein M is the total number of positions on the track, N is the number of positions with pulses, y0 belongs to [1, M-N +1], and 'C' represents the number of combinations; the position number p (0) of the 1 st pulse position on the recording track is y 0-1;
② if N is more than 1, continue to select from R [ p (0)]In one by one subtract CM-p(0)-1 N-2,...,CM-p(0)y1 N-2Until R [ p (0)]The residue value R1(x1) is changed from positive to negative; the 2 nd position number p (1) with pulse position on the recording track is y 1-1;
③ by analogy, from R (n-1) [ p (n-1)]In one by one subtract CM-p(0)-...-p(n-1)-1 N-n-2,...,CM-p(0)-...-p(n-1)-yn N-n-2Until R (n-1) [ p (n-1)]The remainder Rn (yn) of (2) changes from positive to negative; wherein N is less than or equal to N-1; the n +1 th position number p (n) yn-1 having a pulse position on the recording track.
Decoding I2 is complete, obtaining p (N) { p (0), p (1),.., p (N-1) }.
It should be understood that software implementing the encoding and decoding methods of the present invention may be stored in a computer readable medium.
When the coding software is executed, the method comprises the following steps: counting the pulses to be coded on the track according to positions to obtain distribution information of the positions of the pulses on the track; determining a distribution index, wherein the distribution index is calculated according to the following mode: according to a set sequence, arranging all possible distribution situations of the positions of all pulses on the track under the current pulse number, and taking the arranged serial numbers as distribution indexes for indicating the corresponding distribution situations; and generating a coding index, wherein the coding index comprises the information of the distribution index.
When the decoding software is executed, the method comprises the following steps: receiving a coding index; extracting a distribution index from the coding index; determining the distribution of the positions of the pulses on the track according to the distribution index; the pulse sequence on the track is reconstructed according to the distribution of the positions of the individual pulses on the track.
The readable medium is as follows: ROM/RAM, magnetic disk, optical disk, etc.
The codec according to the embodiment of the present invention will be described in detail below.
Ninth embodiment, an encoder 10, as shown in fig. 23, includes:
a first statistical unit 11, configured to perform statistics on the pulses to be encoded on the track according to positions to obtain distribution information of the positions of the pulses on the track
Figure S2007101539527D00251
When counting the pulses with the signs, the first counting unit 11 also outputs information of the sign index corresponding to each pulse according to the positive or negative characteristic of the sign of the pulse of each pulse
Figure S2007101539527D00252
The symbol index indicates pulse symbol information of a pulse corresponding to the index;
distribution indexUnit 12 for following
Figure S2007101539527D00253
Determining the distribution index I4, I4 is calculated as follows: arranging all possible distribution situations of the positions of the pulses on the track under the current pulse number according to a set sequence, and taking the arranged sequence number as I4 for indicating the corresponding distribution situation;
an index generating unit 13 for generating a coding index
Figure S2007101539527D00254
Figure S2007101539527D00255
Information including a distribution index I4; when encoding the signed pulses, the index generation unit 13 also indexes the information of the symbol corresponding to each pulse
Figure S2007101539527D00256
Is combined to
Figure S2007101539527D00257
In (1).
The encoding apparatus of the present embodiment can be used in the encoding methods provided in the first and second embodiments.
Embodiment ten, an encoder 20, as shown in fig. 24, includes a first encoding module 21, a second encoding module 22 and an encoding selection unit 23,
a code selection unit 23 for determining the total number of pulses to be coded on the same track
Figure S2007101539527D00258
According to
Figure S2007101539527D00259
Selecting a coding mode, wherein the selectable coding modes in the embodiment include a first coding mode and a second coding mode; according to the result of the coding mode selection, inAfter determining that the first encoding mode is selected, the first encoding module 21 is triggered to start encoding, and after determining that the second encoding mode is selected, the second encoding module 22 is triggered to start encoding.
The first encoding module 21 includes a first statistical unit 211, a distribution index unit 212, and an index generating unit 213, and is the same as the logic structure of the unit with the same name in the ninth embodiment.
The second encoding module 22 includes:
a second statistical unit 221, configured to perform statistics on pulses to be encoded on the track according to positions, and output the number N of pulse positions, the distribution p (N) of the pulse positions on the track, and the number su (N) of pulses at each pulse position; when counting signed pulses, the second counting unit 221 further outputs corresponding pulse sign information s (n) according to the positive or negative characteristic of each pulse sign with a pulse position;
the index calculation unit 222 includes:
a first index unit 2221 for outputting a first index I1 according to the number N of pulse positions, I1 corresponding to all possible distribution situations of pulse positions on the track for the same number of pulse positions;
a second index unit 2222, configured to output a second index I2 according to the distribution p (n) of the pulse positions on the track, where I2 indicates, from all possible distribution cases corresponding to the first index, a distribution case corresponding to the distribution of the current pulse positions;
a third indexing unit 2223 for outputting a third index I3 in accordance with the pulse number su (n) at each pulse position;
an index combining unit 223 for combining the information of the first, second, and third indexes to generate a coded index; when encoding the signed pulse, the index combining unit 223 further combines information s (n) of the symbol index corresponding to each of the pulse-present positions, which indicates the pulse symbol information of the pulse-present position corresponding to the index, into the encoding index.
When encoding is performed according to the encoding index structure provided in the second encoding method in the third embodiment, the index combining unit 223 may adopt a structure including:
a first combination unit 2231 for outputting a second and third index combined as I23,
I23=I3×W(N)+I2;
w (N) is the total number of all possible distribution situations of the pulse positions on the track, where N is the number of pulse positions corresponding to the first index.
A second combination unit 2232 for overlapping the output of the first combination unit 2231 with information of other indexes and outputting a coded index
Figure S2007101539527D00261
The encoding apparatus of the present embodiment can be used in the encoding methods provided in the third and fourth embodiments.
Eleventh embodiment, a decoder 30, as shown in fig. 25, includes:
an input unit 31 for receiving the code index
Figure S2007101539527D00262
A distribution extraction unit 32 for extracting a distribution from the coded index
Figure S2007101539527D00271
Extracting a distribution index I4;
a distribution decoding unit 33 for indexing according to the distribution
Figure S2007101539527D00272
Determining the distribution of the positions of individual pulses on the track
Figure S2007101539527D00273
A distribution reconstruction unit 34 for distributing the pulses on the track according to their positions
Figure S2007101539527D00274
The pulse sequence on the track is reconstructed.
In decoding the signed pulse, the decoder needs to further include:
a symbol extraction unit 35 for extracting the total number of pulses encoded in the same track
Figure S2007101539527D00275
From the coded index
Figure S2007101539527D00276
Extracting the symbol index corresponding to each pulse
Figure S2007101539527D00277
The symbol index indicates pulse symbol information of a pulse corresponding to the index;
the distribution reconstruction unit 34 then followsThe indicated pulse sign information restores the positive or negative characteristic of the pulse sign of each pulse.
The decoding apparatus of the present embodiment can be used in the decoding methods provided in the fifth and sixth embodiments.
Twelfth embodiment, a decoder 40, as shown in fig. 26, includes a first decoding module 41, a second decoding module 42, and a decoding selection unit 43:
a decoding selection unit 43 for determining the received code index
Figure S2007101539527D00279
On the same trackTotal number of pulses encoded
Figure S2007101539527D002710
According to
Figure S2007101539527D002711
Selecting a decoding mode, wherein the selectable decoding modes in the embodiment include a first decoding mode and a second decoding mode; according to the result of the decoding mode selection, the first decoding module 41 is triggered to start decoding after the first decoding mode is determined to be selected, and the second decoding module 42 is triggered to start decoding after the second decoding mode is determined to be selected.
The first decoding module 41 includes a distribution extracting unit 412, a distribution decoding unit 413, a distribution reconstructing unit 414, and a sign extracting unit 415, and is the same as the logic structure of the unit with the same name in the eleventh embodiment.
The second decoding module 42 includes:
a first extraction unit 421 for receiving the coding index
Figure S2007101539527D002712
From
Figure S2007101539527D002713
Extracting a first index I1, and determining the number N of pulse positions according to I1;
a second extraction unit 422 for extracting the index from the code
Figure S2007101539527D002714
Extracting second and third indexes I2 and I3;
when decoding the coding index structure provided by the second coding method in the third embodiment, the second extracting unit 422 may adopt the following structure, including:
a separating subunit 4221, configured to extract a combined value I23 of the second and third indexes from the coded index;
a resolving subunit 4222 for separating and outputting the second and third indexes I2 and I3,
I2=I23%W(N),I3=Int[I23/W(N)];
wherein w (N) is the total number of all possible distribution situations of the pulse positions on the track, given the number N of pulse positions corresponding to the first index; % represents the remainder; int denotes rounding.
A first decoding unit 423, configured to determine, according to the second index I2, a distribution p (N) of the positions with pulses on the track under the number N of positions with pulses corresponding to I1;
a second decoding unit 424, configured to determine, according to the third index I3, the number of pulses su (n) at each pulse position;
a pulse reconstruction unit 425 for reconstructing the pulse sequence on the track according to the distribution p (n) of the positions with pulses on the track and the number of pulses su (n) at each position with pulses.
In decoding the signed pulse, the decoder needs to further include:
a third extraction unit 426 for extracting N pulses from the pulse position
Figure S2007101539527D00281
Extracting symbol indexes s (n) corresponding to the pulse positions, wherein the symbol indexes indicate pulse symbol information of the pulse positions corresponding to the indexes;
at this time, the pulse reconstruction unit 425 may adopt a structure including:
a first reconstruction unit 4251 for restoring the positive or negative characteristic of the pulse symbol of each pulsed position according to the distribution p (n) of the pulsed positions on the track and the symbol index s (n) corresponding to each pulsed position;
a second reconstruction unit 4252 for reconstructing the pulse sequence on the track according to the distribution of the respective signed pulse positions output by the first reconstruction unit 251 and the number of pulses su (n) at the respective signed pulse positions.
The decoding apparatus of the present embodiment can be used in the decoding methods provided in the seventh and eighth embodiments.
To better understand the above embodiments, specific examples of encoding and decoding are given below, wherein the encoding uses the third encoding method (the first encoding method uses the second calculation method, and the second encoding method uses the fourth calculation method), the decoding uses the seventh decoding method (the first decoding method uses the sixth calculation method, and the second decoding method uses the eighth calculation method), and the selection condition of the first encoding/decoding method is assumed to be
Figure S2007101539527D00282
The total number of positions M on the track is 16.
For example, the pulse search result shown in fig. 8 is coded and decoded.
A. Encoding
Figure S2007101539527D00291
Determining to adopt the second coding mode for coding,
Figure S2007101539527D00292
21 bits are required
Statistics N, P (N), SU (N), S (N)
N=1;
P(1)={p(0)}={2};
SU(1)={su(0)}={6};
S(1)={s(0)}={0};
Coding I1, I2, I3 and I23
As shown in fig. 7, I1 is 0x1F0000 when N is 1;
according to the calculation method of example four, I2 ═ 2;
class (1) ═ 1, I3 ═ 0; therefore, I23 ═ I2 ═ 2;
generation of
Figure S2007101539527D00293
Figure S2007101539527D00294
<math><mrow> <mo>=</mo> <mn>0</mn> <mi>x</mi> <mn>1</mn> <mi>F</mi> <mn>0000</mn> <mo>+</mo> <mn>2</mn> <mo>&times;</mo> <mn>2</mn> <mo>+</mo> <mn>0</mn> </mrow></math>
= 0 x 1 F 0004
B. Decoding
Firstly receive
Figure S2007101539527D00297
Determination based on code length
Figure S2007101539527D00298
Determining to adopt a second decoding mode for decoding;
② extracts I1, s (n) and I23
According to
Figure S2007101539527D00299
As shown in fig. 7, I1 ═ 0x1F0000, and N ═ N1; separating according to N ═ 1The last 1 bit, s (0) ═ 0;
the separation of the I23 is carried out,
Figure S2007101539527D002911
"> k" indicates a shift by k bits to the left;
decoding I23
According to the formula that N is equal to 1, W ( 1 ) = C 16 1 = 16 ;
i3 ═ Int [ I23/W (1) ] -0, corresponding to the only case of SU (1): SU (1) {6 };
i2 ═ I23% W (1) ═ 2; according to the calculation method of the embodiment eight, P (1) ═ { P (0) } ═ 2 };
recovery of pulse sequence
As indicated by P (1) {2}, SU (1) {6}, and s (0) } 0, "6" positive pulses are present at position "2". And finishing the decoding process.
Example two, the pulse search result shown in fig. 27 is coded and decoded.
A. Encoding
Figure S2007101539527D00301
Determining to adopt a first coding mode for coding,
Figure S2007101539527D00302
19 bits are required
② statistics of
Figure S2007101539527D00303
Q(5)={q(0),q(1),q(2),q(3),q(4)}={1,1,4,6,6};
SS(5)={ss(0),ss(1),ss(2),ss(3),ss(4)}={0,0,0,0,0};
Coding I4
According to the calculation method of the second embodiment, I 4 = C 20 5 - C 20 - 1 5 + C 19 - 1 4 - C 19 - 1 4 + C 18 - 1 3 - C 18 - 4 3 + C 17 - 4 2 + C 17 - 6 2 + C 16 - 6 1 - C 16 - 6 1 = 4215 ;
generation of
Figure S2007101539527D00306
<math><mrow> <mi>Index</mi> <mrow> <mo>(</mo> <mn>5</mn> <mo>)</mo> </mrow> <mo>=</mo> <mi>I</mi> <mn>4</mn> <mo>&times;</mo> <msup> <mn>2</mn> <mn>5</mn> </msup> <mo>+</mo> <mi>ss</mi> <mrow> <mo>(</mo> <mn>0</mn> <mo>)</mo> </mrow> <mo>&times;</mo> <msup> <mn>2</mn> <mn>4</mn> </msup> <mo>+</mo> <mi>ss</mi> <mrow> <mo>(</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>&times;</mo> <msup> <mn>2</mn> <mn>4</mn> </msup> <mo>+</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo>+</mo> <mi>ss</mi> <mrow> <mo>(</mo> <mn>4</mn> <mo>)</mo> </mrow> </mrow></math>
<math><mrow> <mo>=</mo> <mn>4215</mn> <mo>&times;</mo> <msup> <mn>2</mn> <mn>5</mn> </msup> <mo>+</mo> <mn>0</mn> </mrow></math>
= 0 x 20 EE 0
B. Decoding
Firstly receive
Figure S2007101539527D003010
Determination based on code length
Figure S2007101539527D003011
Determining to decode by adopting a first decoding mode; (ii) a
Extraction of
According to
Figure S2007101539527D003013
Separation of
Figure S2007101539527D003014
The last 5 bits, ss (0) -ss (4) being 0;
the separation of the I4 is carried out,
Figure S2007101539527D003015
decoding I4
According to the calculation method of the sixth embodiment, Q (5) {1, 1, 4, 6, 6 };
recovery of pulse sequence
As Q (5) {1, 1, 4, 6, 6}, and ss (0) -ss (4) } 0, there are "2" positive "pulses at position" 1 "," 1 "positive" pulses at position "4", and "2" positive "pulses at position" 6 ". And finishing the decoding process.
It can be seen from the above embodiments that the method for sorting and encoding the pulses to be encoded according to the distribution of the positions of the pulses on the track is adopted in the embodiments of the present invention, which can effectively reduce the computational complexity, and meanwhile, since the encoding is performed according to the sorting, different pulse distribution situations correspond to continuous encoding, which can possibly reduce the computational complexityThe redundancy of the coding is reduced, and coding bits are saved. Furthermore, the first and second coding modes provided in the embodiment of the invention are comprehensively adopted, so that the two coding modes are different
Figure S2007101539527D00311
The advantages under the value are mutually complemented, and the effect is more obvious.
The present invention provides a method and a codec, which are described in detail above, and the present invention is described in principle and embodiments by using specific examples, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (34)

1. A method of speech coding, comprising:
counting the pulses to be coded on the track according to positions to obtain distribution information of the positions of the pulses on the track;
determining a distribution index, wherein the distribution index is calculated according to the following mode: according to a set sequence, arranging all possible distribution situations of the positions of all pulses on the track under the current pulse number, and taking the arranged serial numbers as distribution indexes for indicating the corresponding distribution situations;
generating a coding index, wherein the coding index comprises information of the distribution index;
wherein the vectors are distributed in pulses
Figure FDA0000107228260000011
Indicating the distribution of the positions of the individual pulses on the track,
Figure FDA0000107228260000012
the total number of pulses to be coded on the same track; q (h) denotes the position number of the h +1 th pulse on the track,
Figure FDA0000107228260000014
or
Figure FDA0000107228260000015
The distribution index I4 is calculated as:
wherein,
Figure FDA0000107228260000017
m is the total number of positions on the track; q (h) epsilon [0, M](ii) a "C" represents the number of combinations; and Σ denotes summation.
2. The speech coding method according to claim 1, characterized in that:
the pulse to be coded on the track is counted according to the position, and corresponding pulse symbol information is obtained according to the positive or negative characteristic of the pulse symbol of each pulse;
the code index further includes information of a symbol index corresponding to each pulse, the symbol index indicating pulse symbol information of the pulse corresponding to the index.
3. The speech coding method according to claim 1, wherein the positions of the pulses in the current number of pulses are arranged according to the set order according to all possible distribution situations on the track, as follows:
the distribution of the positions of the pulses on the track is corresponding to oneVector of distribution of dimensional pulse
Figure FDA0000107228260000019
Figure FDA00001072282600000110
Wherein,
Figure FDA00001072282600000111
the total number of pulses to be coded on the same track; q (h) denotes the position number of the h +1 th pulse on the track,
Figure FDA00001072282600000112
Figure FDA00001072282600000113
or
Figure FDA00001072282600000114
Figure FDA0000107228260000021
Comparing the size of each dimension of the pulse distribution vector in sequence, and pairing according to the sequence from small to large or from large to small
Figure FDA0000107228260000022
All possible pulse distribution vectors under the dimension are sorted.
4. The speech coding method according to any one of claims 1 to 3, further comprising:
determining the total number of pulses to be coded on the same track;
selecting a coding mode according to the total number of the pulses needing to be coded on the same track, wherein the coding mode comprises a first coding mode;
and according to the result of the selection of the coding mode, after the first coding mode is determined to be selected, counting the pulses to be coded on the track according to positions, and acquiring distribution information of the positions of the pulses on the track.
5. The speech coding method according to claim 4, wherein the step of selecting the coding mode according to the total number of the pulses to be coded in the same track comprises: and when the total number of the pulses needing to be coded on the same track is 3, 4 or 5, determining to select the first coding mode.
6. The speech coding method according to claim 4, wherein the coding scheme further includes a second coding scheme, and the coding method further includes:
according to the result of the coding mode selection, after determining to select a second coding mode, executing the second coding mode according to the following steps:
counting the pulses to be coded on the track according to positions to obtain the number of positions with pulses, the distribution of the positions with pulses on the track and the number of pulses at each position with pulses;
determining a first index according to the number of the pulse positions, wherein the first index corresponds to all possible distribution situations of the pulse positions on the track under the same number of the pulse positions;
determining a second index according to the distribution of the pulse positions on the track, wherein the second index indicates the distribution corresponding to the distribution of the current pulse positions from all possible distribution conditions corresponding to the first index;
determining a third index according to the number of pulses at each position with pulses;
and generating a coding index, wherein the coding index comprises the information of the first index, the second index and the third index.
7. The speech coding method according to claim 6, characterized in that:
in a second coding mode, when the pulse to be coded on the track is counted according to the position, corresponding pulse symbol information is obtained according to the positive or negative characteristic of each pulse symbol with a pulse position;
the code index further includes information of a symbol index corresponding to each of the pulsed positions, the symbol index indicating pulse symbol information of the pulsed position corresponding to the index.
8. The speech coding method according to claim 6, characterized in that: in a second encoding mode, the generated encoding index is obtained by overlapping information of other indexes with the first index as a starting value; a value of the first index corresponds to an independent range of values of the coding index.
9. The speech coding method according to claim 8, characterized in that: the number of the positions with pulses and the first index are in one-to-one correspondence;
the number of the pulses to be coded is 6, when the number of the pulse positions is 1, 2, 3, 4, 5 and 6, the first indexes corresponding to the sequence one by one are respectively 1F0000, 1E0000, 1D0000, 180000, 000000 and 100000 in hexadecimal representation; or,
the number of the pulses to be coded is 5, and when the number of the pulse positions is 1, 2, 3, 4 and 5, the first indexes corresponding to the sequence one by one are respectively 78000, 70000, 60000, 40000 and 00000 in hexadecimal representation; or,
the number of the pulses to be coded is 4, and when the number of the pulse positions is 1, 2, 3 and 4, the first indexes corresponding to the sequence one by one are respectively expressed as E000, C000, 8000 and 0000 in hexadecimal; or,
the number of the pulses to be coded is 3, and when the number of the pulse positions is 1, 2 and 3, respectively, first indexes corresponding to the sequence one by one are respectively 1C00, 1800 and 0000 in hexadecimal representation; or,
the track has 16 positions, the number of pulses to be coded is 2, and when the number of pulse positions is 1 and 2, the first indexes corresponding to the pulse positions in sequence are 1E0 and 000 in hexadecimal representation.
10. The speech coding method according to claim 8, characterized in that: when the first index is used as a starting value and information of other indexes is superposed, the second index and the third index are combined into a form of superposition:
I3×W(N)+I2;
wherein, I2 and I3 are respectively a second index and a third index; w (N) is the total number of all possible distribution cases of the pulse positions on the track for the number N of pulse positions corresponding to the first index.
11. The speech coding method according to claim 6, wherein the determining of the second index according to the distribution of the positions with pulses on the track is performed by calculating the second index as follows:
and arranging all possible distribution situations of the pulse positions on the track under the number of the pulse positions corresponding to the first index according to a set sequence, and taking the arranged sequence number as a second index for indicating the corresponding distribution situation.
12. The speech coding method according to claim 11, wherein the arranging, in the set order, all possible distributions of the pulse positions on the track, among the number of pulse positions corresponding to the first index, is performed as follows:
the distribution of the pulse positions on the track is mapped to an N-dimensional pulse position vector p (N),
P(N)={p(0),p(1),...,p(N-1)};
wherein N is the number of positions with pulses; p (N) represents the position number of the position with pulse on the track, N belongs to [0, N-1 ]; p (0) < p (1) <. < p (N-1), or p (0) > p (1) > p (N-1);
and sequentially comparing the sizes of all dimensions of the pulse position vector, and sequencing all possible pulse position vectors under the N dimensions according to the sequence from small to large or from large to small.
13. The speech coding method according to claim 12, wherein the second index is calculated by:
<math> <mrow> <mi>I</mi> <mn>2</mn> <mo>=</mo> <msubsup> <mi>C</mi> <mi>M</mi> <mi>N</mi> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mn>0</mn> <mo>)</mo> </mrow> </mrow> <mi>N</mi> </msubsup> <mo>+</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <mo>[</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>-</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>-</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>n</mi> </mrow> </msubsup> <mo>-</mo> <msubsup> <mi>C</mi> <mrow> <mi>M</mi> <mo>-</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>N</mi> <mo>-</mo> <mi>n</mi> </mrow> </msubsup> <mo>]</mo> <mo>;</mo> </mrow> </math>
wherein M is the total number of positions on the track; p (0) is belonged to [0, M-N ], p (N) is belonged to [ p (N-1) +1, M-N + N ]; "C" represents the number of combinations; and Σ denotes summation.
14. A method for speech decoding, comprising:
receiving a coding index;
extracting a distribution index from the coding index;
determining the distribution of the positions of the pulses on the track according to the distribution index;
reconstructing a pulse sequence on the track according to the distribution of the positions of the pulses on the track;
the determining the distribution of the positions of the pulses on the track according to the distribution index includes:
sequentially calculating according to the sequence from small to large of q (0)
Figure FDA0000107228260000051
Wherein q (0) ∈ [0, M >]M is the total number of positions on the track,
Figure FDA0000107228260000052
the total number of pulses encoded on the same track,
Figure FDA0000107228260000053
Figure FDA0000107228260000054
"C" represents the number of combinations; record the last order T [ q (0)]The q (0) value larger than zero is used as the position serial number v0 of the 1 st pulse on the track; wherein I4 is a distribution index;
if it is
Figure FDA0000107228260000055
Then continue to calculate in order from small to large q (1)
Figure FDA0000107228260000056
Wherein q (1) ∈ [ v0, M](ii) a Record the last order T1[ q (1)]The q (1) value greater than zero is used as the position serial number v1 of the 2 nd pulse on the track;
by analogy, the calculation is carried out in sequence from the small to the large of q (h)
Figure FDA0000107228260000058
Figure FDA0000107228260000059
Wherein q (h) epsilon [ v (h-1), M],
Figure FDA00001072282600000510
Record the last line Th [ q (h)]The value of q (h) greater than zero is used as the position index vh of the h +1 th pulse on the track.
15. The speech decoding method of claim 14, further comprising:
extracting a symbol index corresponding to each pulse from the coding index, wherein the symbol index indicates pulse symbol information of the pulse corresponding to the index;
when reconstructing the pulse sequence on the track, the positive or negative characteristic of the pulse sign of each pulse is also recovered according to the pulse sign information.
16. The speech decoding method according to any one of claims 14 to 15, further comprising:
determining a total number of pulses encoded on the same track by the received code index;
selecting a decoding mode according to the total number of the pulses coded on the same track, wherein the decoding mode comprises a first decoding mode;
and according to the result of the decoding mode selection, after the first decoding mode is determined to be selected, the step of extracting the distribution index from the coding index is executed.
17. The speech decoding method of claim 16, wherein the step of selecting the decoding mode according to the total number of pulses encoded in the same track comprises: and when the total number of the pulses coded on the same track is 3 or 4 or 5, determining to select a first decoding mode.
18. The speech decoding method of claim 17, wherein the decoding modes further include a second decoding mode, the decoding method further comprising:
according to the result of the decoding mode selection, after determining to select a second decoding mode, executing the second decoding mode according to the following steps:
extracting a first index from the coding indexes, and determining the number of positions with pulses according to the first index;
extracting a second index and a third index from the coding indexes;
determining distribution of the pulse positions on the track according to a second index under the number of the pulse positions corresponding to the first index;
determining the number of pulses at each position with pulses according to the third index;
the pulse sequence on the track is reconstructed according to the distribution of the positions of the pulses on the track and the number of pulses at each position of the pulses.
19. The speech decoding method of claim 18, wherein: after the number of the pulse positions is determined, symbol indexes corresponding to the pulse positions are extracted from the coding indexes, and the symbol indexes indicate pulse symbol information of the pulse positions corresponding to the indexes;
when reconstructing the pulse sequence on the track, the positive or negative characteristic of each pulse symbol having a pulse position is also restored according to the pulse symbol information.
20. The speech decoding method of claim 18, wherein the extracting the first index from the coding indices comprises: and judging the value range of the code index from a plurality of set independent value ranges, and determining the first index according to the initial value corresponding to the value range.
21. The speech decoding method of claim 20, wherein the extracting the second and third indices from the coded indices comprises: extracting the combined value I23 of the second index and the third index from the coded index, separating the second index and the third index according to the following mode,
I2=I23%W(N),I3=Int[I23/W(N)];
wherein, I2 and I3 are respectively a second index and a third index; w (N) is the total number of all possible distribution situations of the pulse positions on the track, given the number N of pulse positions corresponding to the first index; % represents the remainder; int denotes rounding.
22. The speech decoding method of claim 18 wherein the determining the distribution of the positions of the bursts on the track according to the second index uses:
one by one subtraction from the second index I2
Figure FDA0000107228260000071
The remainder R (y0) until I2 changes from positive to negative; wherein M is the total number of positions on the track, N is the number of positions with pulses, y 0E [1, M-N +1]]"C" represents the number of combinations; the position number p (0) of the 1 st pulse position on the recording track is y 0-1;
if N > 1, continue from R [ p (0)]One by one subtract
Figure FDA0000107228260000072
Up to R [ p (0)]The residue value R1(y1) is changed from positive to negative; the 2 nd position number p (1) with pulse position on the recording track is y 1-1;
by analogy, from R (n-1) [ p (n-1)]One by one subtract
Figure FDA0000107228260000073
Figure FDA0000107228260000074
Up to R (n-1) [ p (n-1)]The remainder Rn (yn) of (2) changes from positive to negative; wherein N is less than or equal to N-1; the n +1 th position number p (n) yn-1 having a pulse position on the recording track.
23. A speech coder, comprising:
the first statistical unit is used for counting the pulses to be coded on the track according to positions to obtain distribution information of the positions of the pulses on the track;
a distribution index unit, configured to determine a distribution index, where the distribution index is calculated as follows: according to a set sequence, arranging all possible distribution situations of the positions of all pulses on the track under the current pulse number, and taking the arranged serial numbers as distribution indexes for indicating the corresponding distribution situations;
wherein the vectors are distributed in pulses
Figure FDA0000107228260000075
Indicating the position of each pulseThe distribution on the track is that on the track,
Figure FDA0000107228260000076
the total number of pulses to be coded on the same track; q (h) denotes the position number of the h +1 th pulse on the track,
Figure FDA0000107228260000077
Figure FDA0000107228260000078
or
Figure FDA0000107228260000079
The distribution index I4 is calculated as:
Figure FDA00001072282600000710
wherein,
Figure FDA00001072282600000711
m is the total number of positions on the track; q (h) epsilon [0, M](ii) a "C" represents the number of combinations; Σ denotes summation;
an index generating unit configured to generate a coding index, where the coding index includes information of the distribution index.
24. The speech coder of claim 23, wherein: the first statistical unit further outputs information of a symbol index corresponding to each pulse according to a positive or negative characteristic of a pulse symbol of each pulse, the symbol index indicating pulse symbol information of the pulse corresponding to the index; the index generation unit also combines information of symbol indexes corresponding to the respective pulses into the code index.
25. The speech coder of claim 23 or 24, further comprising:
the encoding selection unit is used for determining the total number of pulses needing encoding on the same track; selecting a coding mode according to the total number of the pulses needing to be coded on the same track, wherein the coding mode comprises a first coding mode; and triggering the first statistic unit to start to execute coding after determining to select the first coding mode according to the result of the coding mode selection.
26. The speech coder of claim 25, further comprising:
the second statistical unit is used for performing statistics on the pulses to be coded on the track according to positions and outputting the number of positions with the pulses, the distribution of the positions with the pulses on the track and the number of the pulses at each position with the pulses;
an index calculation unit, the index calculation unit comprising: the first index unit is used for outputting a first index according to the number of the pulse positions, and the first index corresponds to all possible distribution conditions of the pulse positions on the track under the same number of the pulse positions; the second index unit is used for outputting a second index according to the distribution of the pulse positions on the track, and the second index indicates the distribution situation corresponding to the distribution of the current pulse positions from all possible distribution situations corresponding to the first index; a third indexing unit for outputting a third index according to the number of pulses at each position having pulses;
the index combination unit is used for combining the information of the first index, the second index and the third index to generate a coding index;
the coding mode selectable by the coding selection unit further comprises a second coding mode, and the coding selection unit triggers the second statistical unit to start coding after determining and selecting the second coding mode according to the result of the coding mode selection.
27. The speech coder of claim 26, wherein: the second statistical unit also outputs corresponding pulse symbol information according to the positive or negative characteristic of each pulse symbol with a pulse position; the index combining unit further combines information of symbol indexes corresponding to the respective pulse positions into the code index, the symbol indexes indicating pulse symbol information of the pulse position corresponding to the index.
28. The speech coder of claim 26, wherein the index combining unit comprises:
a first combination unit for outputting a second and third index combined in the form of,
I3×W(N)+I2;
wherein, I2 and I3 are respectively a second index and a third index; w (N) is the total number of all possible distribution situations of the pulse positions on the track, given the number N of pulse positions corresponding to the first index;
and the second combination unit is used for superposing the output of the first combination unit and the information of other indexes and outputting the coding index.
29. A speech decoder, comprising:
an input unit for receiving a coding index;
a distribution extraction unit, configured to extract a distribution index from the coding indexes;
the distribution decoding unit is used for determining the distribution of the positions of the pulses on the track according to the distribution index; the determining the distribution of the positions of the pulses on the track according to the distribution index includes:
sequentially calculating according to the sequence from small to large of q (0)
Figure FDA0000107228260000091
Wherein q (0) ∈ [0, M >]M is the total number of positions on the track,
Figure FDA0000107228260000092
the total number of pulses encoded on the same track,
Figure FDA0000107228260000093
Figure FDA0000107228260000094
"C" represents the number of combinations; record the last order T [ q (0)]The q (0) value larger than zero is used as the position serial number v0 of the 1 st pulse on the track; wherein I4 is a distribution index;
if it is
Figure FDA0000107228260000095
Then continue to calculate in order from small to large q (1)
Figure FDA0000107228260000096
Figure FDA0000107228260000097
Wherein q (1) ∈ [ v0, M](ii) a Record the last order T1[ q (1)]The q (1) value greater than zero is used as the position serial number v1 of the 2 nd pulse on the track;
by analogy, the calculation is carried out in sequence from the small to the large of q (h)
Figure FDA0000107228260000099
Wherein q (h) epsilon [ v (h-1), M],
Figure FDA00001072282600000910
Record the last line Th [ q (h)]The value of q (h) which is larger than zero is used as the position sequence number vh of the h +1 th pulse on the track;
a distribution reconstruction unit for reconstructing the pulse sequence on the track according to the distribution of the positions of the individual pulses on the track.
30. The speech decoder of claim 29, further comprising:
a symbol extraction unit, configured to extract a symbol index corresponding to each pulse from the coding indexes according to a total number of pulses coded on the same track, where the symbol index indicates pulse symbol information of a pulse corresponding to the index;
the distribution reconstruction unit recovers the positive or negative characteristic of the pulse sign of each pulse according to the pulse sign information.
31. The speech decoder according to claim 29 or 30, further comprising:
a decoding selection unit for determining the total number of pulses of the received code index coded on the same track; selecting a decoding mode according to the total number of the pulses coded on the same track, wherein the decoding mode comprises a first decoding mode; and triggering the distribution extraction unit to start decoding after determining that the first decoding mode is selected according to the result of the decoding mode selection.
32. The speech decoder of claim 31, further comprising:
the first extraction unit is used for receiving the coded indexes, extracting first indexes from the coded indexes and determining the number of pulse positions according to the first indexes;
a second extraction unit, configured to extract a second index and a third index from the coded indexes;
the first decoding unit is used for determining distribution of pulse positions on the track under the number of the pulse positions corresponding to the first index according to the second index;
a second decoding unit for determining the number of pulses at each of the positions having pulses according to the third index;
the pulse reconstruction unit is used for reconstructing a pulse sequence on the track according to the distribution of the positions with pulses on the track and the number of pulses on each position with pulses;
the decoding mode selectable by the decoding selection unit also comprises a second decoding mode, and the decoding selection unit triggers the first extraction unit to start decoding after determining to select the second decoding mode according to the result selected by the decoding mode.
33. The speech decoder of claim 32, further comprising: a third extraction unit configured to extract, from the code indices, symbol indices corresponding to respective pulse positions in accordance with the number of pulse positions, the symbol indices indicating pulse symbol information of the pulse position corresponding to the index;
the pulse reconstruction unit comprises: a first reconstruction unit for restoring the positive or negative characteristic of the pulse symbol of each pulsar position according to the distribution of the pulsar position on the track and the symbol index corresponding to each pulsar position; a second reconstruction unit for reconstructing a pulse sequence on the track according to the distribution of the respective signed pulse positions and the number of pulses at the respective pulse positions.
34. The speech decoder of claim 32, wherein the second extraction unit comprises: a separation subunit, configured to extract a combined value I23 of the second and third indexes from the coded index;
the analysis subunit is used for separating and outputting the second index and the third index according to the following mode,
I2=I23%W(N),I3=Int[I23/W(N)];
wherein, I2 and I3 are respectively a second index and a third index; w (N) is the total number of all possible distribution situations of the pulse positions on the track, given the number N of pulse positions corresponding to the first index; % represents the remainder; int denotes rounding.
CN2007101539527A 2007-04-29 2007-09-15 Coding and decoding method, coder and decoder Active CN101388210B (en)

Priority Applications (19)

Application Number Priority Date Filing Date Title
CN2007101539527A CN101388210B (en) 2007-09-15 2007-09-15 Coding and decoding method, coder and decoder
EP14184929.9A EP2827327B1 (en) 2007-04-29 2008-04-29 Method for Excitation Pulse Coding
ES08734199.6T ES2529292T3 (en) 2007-04-29 2008-04-29 Encoding and decoding method
DK14184929.9T DK2827327T3 (en) 2007-04-29 2008-04-29 Method for excitation pulse coding
PT141849299T PT2827327T (en) 2007-04-29 2008-04-29 Coding method, decoding method, coder, and decoder
JP2010504431A JP5221642B2 (en) 2007-04-29 2008-04-29 Encoding method, decoding method, encoder, and decoder
PCT/CN2008/070841 WO2008134974A1 (en) 2007-04-29 2008-04-29 An encoding method, a decoding method, an encoder and a decoder
EP08734199.6A EP2157573B1 (en) 2007-04-29 2008-04-29 An encoding and decoding method
ES14184929T ES2817906T3 (en) 2007-04-29 2008-04-29 Pulse coding method of excitation signals
US12/607,723 US8294602B2 (en) 2007-04-29 2009-10-28 Coding method, decoding method, coder and decoder
US13/622,207 US8988256B2 (en) 2007-04-29 2012-09-18 Coding method, decoding method, coder, and decoder
JP2013046027A JP5866307B2 (en) 2007-04-29 2013-03-07 Encoding method, decoding method, encoder, and decoder
US14/617,585 US9225354B2 (en) 2007-04-29 2015-02-09 Coding method, decoding method, coder, and decoder
US14/974,171 US9444491B2 (en) 2007-04-29 2015-12-18 Coding method, decoding method, coder, and decoder
JP2016000105A JP6239652B2 (en) 2007-04-29 2016-01-04 Encoding method and encoding apparatus
US15/228,661 US9912350B2 (en) 2007-04-29 2016-08-04 Coding method, decoding method, coder, and decoder
US15/880,300 US10153780B2 (en) 2007-04-29 2018-01-25 Coding method, decoding method, coder, and decoder
US16/184,240 US10425102B2 (en) 2007-04-29 2018-11-08 Coding method, decoding method, coder, and decoder
US16/568,144 US10666287B2 (en) 2007-04-29 2019-09-11 Coding method, decoding method, coder, and decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101539527A CN101388210B (en) 2007-09-15 2007-09-15 Coding and decoding method, coder and decoder

Publications (2)

Publication Number Publication Date
CN101388210A CN101388210A (en) 2009-03-18
CN101388210B true CN101388210B (en) 2012-03-07

Family

ID=40477580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101539527A Active CN101388210B (en) 2007-04-29 2007-09-15 Coding and decoding method, coder and decoder

Country Status (1)

Country Link
CN (1) CN101388210B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2817906T3 (en) 2007-04-29 2021-04-08 Huawei Tech Co Ltd Pulse coding method of excitation signals
CN101931414B (en) 2009-06-19 2013-04-24 华为技术有限公司 Pulse coding method and device, and pulse decoding method and device
CN102299760B (en) 2010-06-24 2014-03-12 华为技术有限公司 Pulse codec method and pulse codec
CN103886862B (en) * 2010-06-24 2018-09-28 华为技术有限公司 Pulse decoding method and pulse codec
CN102623012B (en) 2011-01-26 2014-08-20 华为技术有限公司 Vector joint coding and decoding method, and codec
WO2012110447A1 (en) 2011-02-14 2012-08-23 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Apparatus and method for error concealment in low-delay unified speech and audio coding (usac)
CA2903681C (en) 2011-02-14 2017-03-28 Fraunhofer-Gesellschaft Zur Forderung Der Angewandten Forschung E.V. Audio codec using noise synthesis during inactive phases
CA2827277C (en) 2011-02-14 2016-08-30 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Linear prediction based coding scheme using spectral domain noise shaping
MY159444A (en) 2011-02-14 2017-01-13 Fraunhofer-Gesellschaft Zur Forderung Der Angewandten Forschung E V Encoding and decoding of pulse positions of tracks of an audio signal
MX2013009344A (en) 2011-02-14 2013-10-01 Fraunhofer Ges Forschung Apparatus and method for processing a decoded audio signal in a spectral domain.
EP3239978B1 (en) * 2011-02-14 2018-12-26 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Encoding and decoding of pulse positions of tracks of an audio signal
BR112012029132B1 (en) 2011-02-14 2021-10-05 Fraunhofer - Gesellschaft Zur Förderung Der Angewandten Forschung E.V REPRESENTATION OF INFORMATION SIGNAL USING OVERLAY TRANSFORMED
WO2012110448A1 (en) 2011-02-14 2012-08-23 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Apparatus and method for coding a portion of an audio signal using a transient detection and a quality result
EP2676265B1 (en) 2011-02-14 2019-04-10 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Apparatus and method for encoding an audio signal using an aligned look-ahead portion
CN117831546A (en) * 2022-09-29 2024-04-05 抖音视界有限公司 Coding, decoding method, encoder, decoder, electronic device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Andy C. Hung, Ely K. Tsern, and Teresa H. Meng.Error Resilient Pyramid Vector Quantization for Image Compression.《IEEE Transactions on Image Processing》.1994,583-587. *
Udar Mittal et al.Coding Unconstrained FCB Excitation using Combinatorial and Huffman Codes.《IEEE WORKSHOP PROCEEDINGS》.2002,129-131. *

Also Published As

Publication number Publication date
CN101388210A (en) 2009-03-18

Similar Documents

Publication Publication Date Title
CN101388210B (en) Coding and decoding method, coder and decoder
CN101295506B (en) Pulse coding and decoding method and device
US10666287B2 (en) Coding method, decoding method, coder, and decoder
CN111274816B (en) Named entity identification method based on neural network and vehicle machine
KR100984234B1 (en) Vector Coding / Decoding Method and Apparatus and Stream Media Player
CN102299760A (en) Pulse codec method and pulse codec
CN114640354A (en) Data compression method and device, electronic equipment and computer readable storage medium
CN102623012A (en) Vector joint coding and decoding method, and codec
CN101266796B (en) Quantization encoding and decoding method and device
CN114023392B (en) A codeword design method for DNA storage
CN101266795A (en) A method and device for implementing lattice vector quantization encoding and decoding
CN103886862B (en) Pulse decoding method and pulse codec
CN113177638B (en) Processor and method for generating binarized weights for neural networks
CN101577551A (en) Method and device for generating lattice vector quantization codebook
Khandelwal et al. Implementation of Direct Indexing and 2-V Golomb Coding of Lattice Vectors for Image Compression
CN1728561A (en) Positioning compress/decompress method of multiple sequences of number-local digital features

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