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
distribution
coding
track
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 PCT/CN2008/070841 priority patent/WO2008134974A1/en
Priority to DK14184929.9T priority patent/DK2827327T3/en
Priority to EP08734199.6A priority patent/EP2157573B1/en
Priority to JP2010504431A priority patent/JP5221642B2/en
Priority to ES14184929T priority patent/ES2817906T3/en
Priority to EP14184929.9A priority patent/EP2827327B1/en
Priority to PT141849299T priority patent/PT2827327T/en
Priority to ES08734199.6T priority patent/ES2529292T3/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

The invention discloses a coding method, which sorts and codes pulses which need to be coded according to the distribution of the positions of the pulses on a track. The invention further provides a corresponding decoding method and a codec. Proved by research practice, coding logic can effectively reduce the complexity of calculation, simultaneously because of coding according to sorting, different pulse distribution corresponds to continuous coding, thereby being capable of reducing the redundancy of the coding as possible, and saving the coded bits.

Description

Decoding method and codec
Technical field
The present invention relates to decoding method and corresponding codec.
Background technology
In the vector coding technology, the residual signals after usually using algebraic-codebook to auto adapted filtering carries out quantization encoding.After obtaining the position and symbolic information of best algebraic-codebook pulse on the track through search, calculate corresponding index value through coding, make decoding end to rebuild pulse train according to this index value.Guarantee to reduce the needed bit of code index value under the harmless prerequisite of rebuilding as far as possible, be one of main target of algebraic-codebook pulse code method research and development.
Below with a kind of more excellent coding method in the voice coding---wideband adaptive multi code Rate of Chinese character (AMR_WB+:Adaptive Multi-Rate Wideband) coding method is an example, and a kind of specific coding method that existing algebraic-codebook pulse is adopted is described.According to the difference of encoder bit rate, 1~N the pulse of on each track, can encoding supposes that each track has M=2 mIndividual position, the process of 1~6 pulse of encoding on each track among the AMR_WB+ is described below respectively:
1. 1 pulse of each track coding
Because each track has 2 mIndividual position, therefore, the location index of pulse need be encoded with m bit on each track, and 1 bits of encoded need be used in the notation index of pulse.The index value of 1 tape symbol pulse of coding is:
I 1p(m)=p+s×2 m
Wherein p ∈ [0,2 m-1] for the location index of pulse; S is the notation index of pulse, and when impulse code is correct time, s is set to 0, when impulse code when negative, s is set to 1; I 1p∈ [0,2 M+1-1].
1 required bit number of pulse of each track coding is: m+1.
2. 2 pulses of each track coding
According to result 1.; 1 pulse of each track coding needs m+1 bit; The location index of another pulse encoded needs m bit, because the paired pulses order does not have special demands, and can be through arranging the symbol that magnitude relationship that the pulse position index obtains represented another pulse.The index value of 2 pulses of coding is:
I 2p(m)=p1+I 1p0×2 m=p1+p0×2 m+s×2 2m
Wherein p0, p1 ∈ [0,2 m-1] is respectively the location index of 2 pulses; S is the notation index of p0 pulse; The concrete expression rule of p1 impulse code is: p0<p1 representes that 2 impulse codes are identical, and p0>p1 representes that 2 impulse codes are opposite; I 2p∈ [0,2 2m+1-1].
2 required bit numbers of pulse of each track coding are: 2m+1.
3. 3 pulses of each track coding
Each track is divided into two parts: Section A and Section B, each part respectively comprises 2 M-1Individual position.At least comprise 2 pulses in certain part, according to result 2., this part of encoding needs 2 * (m-1)+1=2m-1 bit; Another pulse is then searched on whole rail, according to result 1., needs m+1 bit; In addition, also need indicate the part that comprises 2 pulses with 1 bit.The index value of 3 pulses of coding is:
I 3p(m)=I 2p(m-1)+k×2 2m-1+I 1p(m)×2 2m
Wherein k is the index of Section; I 3p∈ [0,2 3m+1-1].
3 required bit numbers of pulse of each track coding are: 3m+1.
4. 4 pulses of each track coding
Each track is divided into two parts: Section A and Section B, each part respectively comprises 2 M-1Individual position.The combined situation that comprises pulse number in the each several part is as shown in the table:
Classification Umber of pulse among the Section A Umber of pulse among the Section B Need bit number
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 last table, the corresponding foundation that needs bit number of each classification is: for classification 0 and classification 4, in the part that 4 pulses are arranged, adopt similar method 3., the pulse number that just carries out whole search is 2, is equivalent to I 2p(m-2)+k * 2 2m-3+ I 2p(m-1) * 2 2m-2For classification 1, be equivalent to I 1p(m-1)+I 3p(m-1) * 2 mFor classification 2, be equivalent to I 2p(m-1)+I 2p(m-1) * 2 2m-1For classification 3, be equivalent to I 3p(m-1)+I 1p(m-1) * 2 3m-2
Regard classification 0 and classification 4 as a kind of possible situation, classification 1~3 then always has 4 kinds of situation respectively as a kind of situation, therefore need represent corresponding situation with 2 bits, and then classification 1~3 all needs 4m-2+2=4m bit; In addition, for the situation that comprises classification 0 and classification 4, also need distinguish, so classification 0 needs 4m-3+2+1=4m bit with classification 4 with 1 bit.
4 required bit numbers of pulse of each track coding are: 4m.
5., 5 pulses of each track coding
Each track is divided into two parts: Section A and Section B, each part respectively comprises 2 M-1Individual position.At least comprise 3 pulses in certain part, according to result 3., this part of encoding needs 3 * (m-1)+1=3m-2 bit; Remaining two pulses are then searched on whole rail, according to result 2., need 2m+1 bit; In addition, also need indicate the part that comprises 3 pulses with 1 bit.The index value of 5 pulses of coding is:
I 5p(m)=I 3p(m-1)+k×2 3m-2+I 1p(m)×2 3m-1
5 required bit numbers of pulse of each track coding are: 5m.
6. 6 pulses of each track coding
Each track is divided into two parts: Section A and Section B, each part respectively comprises 2 M-1Individual position.The combined situation that comprises pulse number in the each several part is as shown in the table:
Classification Umber of pulse among the Section A Umber of pulse among the Section B Need bit number
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 last table, 4. the corresponding foundation that needs bit number of each classification can copy and calculate, repeats no more.
Respectively regard classification 0 and 6, classification 1 and 5, classification 2 and 4 as a kind of possible situation respectively, classification 3 then always has 4 kinds of situation separately as a kind of situation, therefore need represent corresponding situation with 2 bits, and then classification 3 needs 6m-4+2=6m-2 bit; Comprise the situation that merges classification for those, also need distinguish with 1 bit, therefore other classifications except that classification 3 need 6m-5+2+1=6m-2 bit.
6 required bit numbers of pulse of each track coding are: 6m-2.
In proposing process of the present invention, the inventor finds, the algebraically pulse code method that AMR_WB+ provides; Adopt the codimg logic of similar recurrence, the situation that a fairly large number of situation of coded pulse is split as several coded pulse negligible amounts is handled, and computation complexity is bigger; Simultaneously; Along with the increase of coded pulse number on the track, the redundance of code index will add up gradually, cause the waste of coded-bit easily.
Summary of the invention
The present invention provides a kind of can effectively reduce coding/decoding method and the coder/decoder that computation complexity is saved coded-bit simultaneously as far as possible.
A kind of coding method comprises: the pulse to needs coding on the track is added up according to the position, obtains the position distributed intelligence in orbit of each pulse; Confirm distribution index; Said distribution index calculates according to following mode: according to the order of setting; Under current pulse number, the position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging distribution index as the corresponding distribution situation of indication; Generate code index, said code index comprises the information of said distribution index.
A kind of coding/decoding method comprises: the received code index; From said code index, extract distribution index; Confirm the position distribution in orbit of each pulse according to said distribution index; The pulse train on the track is rebuild in position distribution in orbit according to each pulse.
A kind of scrambler comprises: first statistic unit, be used for the pulse of needs coding on the track is added up according to the position, and obtain the position distributed intelligence in orbit of each pulse; The distribution index unit; Be used for confirming distribution index; Said distribution index calculates according to following mode: according to the order of setting; Under current pulse number, the position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging distribution index as the corresponding distribution situation of indication; The index generation unit is used to generate code index, and said code index comprises the information of said distribution index.。
A kind of demoder comprises: input block is used for the received code index; The distribution extraction unit is used for extracting distribution index from said code index; The distribution solution code element is used for confirming according to said distribution index the position distribution in orbit of each pulse; The distribution reconstruction unit is used for rebuilding the pulse train on the track according to the position distribution in orbit of each pulse.
Technique scheme adopts the pulse that needs are encoded to sort and Methods for Coding according to the position distribution in orbit of pulse; Research practice proves that this scheme can effectively reduce computation complexity, and simultaneously owing to encode according to ordering, the coding that different pulse distribution is corresponding continuous can reduce the redundance of coding as much as possible, saves coded-bit.
Description of drawings
Fig. 1 is the embodiment of the invention one a coding method schematic flow sheet;
Fig. 2 is 5 pulse code index structure synoptic diagram in the embodiment of the invention one;
Fig. 3 is 4 pulse code index structure synoptic diagram in the embodiment of the invention one;
Fig. 4 is 3 pulse code index structure synoptic diagram in the embodiment of the invention one;
Figure 5 is a second embodiment of the present invention in?
Figure S2007101539527D00051
When? tree structure diagram;
Fig. 6 is the embodiment of the invention three coding method schematic flow sheets;
Fig. 7 is 6 pulse code index structure synoptic diagram in the embodiment of the invention three;
Fig. 8 is the possible combined situation synoptic diagram of SU in the embodiment of the invention three (1);
Fig. 9 is the possible combined situation synoptic diagram of SU in the embodiment of the invention three (2);
Figure 10 is the possible combined situation synoptic diagram of SU in the embodiment of the invention three (3);
Figure 11 is the possible combined situation synoptic diagram of SU in the embodiment of the invention three (4);
Figure 12 is the possible combined situation synoptic diagram of SU in the embodiment of the invention three (5);
Figure 13 is the possible combined situation synoptic diagram of SU in the embodiment of the invention three (6);
Figure 14 is 5 pulse code index structure synoptic diagram in the embodiment of the invention three;
Figure 15 is 4 pulse code index structure synoptic diagram in the embodiment of the invention three;
Figure 16 is 3 pulse code index structure synoptic diagram in the embodiment of the invention three;
Figure 17 is 2 pulse code index structure synoptic diagram in the embodiment of the invention three;
Figure 18 is 1 a pulse code index structure synoptic diagram in the embodiment of the invention three;
Figure 19 is X (N) the tree construction synoptic diagram during N=2 in the embodiment of the invention four;
Figure 20 is X (N) the tree construction synoptic diagram during N=3 in the embodiment of the invention four;
Figure 21 is the embodiment of the invention five coding/decoding method schematic flow sheets;
Figure 22 is the embodiment of the invention seven coding/decoding method schematic flow sheets;
Figure 23 is the embodiment of the invention nine encoder logic structural representations;
Figure 24 is the embodiment of the invention ten encoder logic structural representations;
Figure 25 is the embodiment of the invention 11 decoder logic structural representations;
Figure 26 is the embodiment of the invention 12 decoder logic structural representations;
Figure 27 is the pulse search figure as a result in the application examples two of the embodiment of the invention three, seven methods.
Embodiment
The embodiment of the invention provides a kind of coding method, and the pulse that needs are encoded is sorted and encoded according to the position distribution in orbit of pulse.The embodiment of the invention also provides corresponding coding/decoding method, and coder/decoder.Below respectively the method and apparatus of the embodiment of the invention is elaborated.
Embodiment one, a kind of coding method, as shown in Figure 1, comprising:
A1, the pulse that needs coding on the track is added up according to the position, obtained the position distributed intelligence in orbit of each pulse.
Need the pulse sum of coding to confirm according to code check usually on the same track, need the pulse number of coding many more, the bit number that obvious code index needs is also many more, and code check is high more.Among this paper,
The pulse of representing needs coding on the same track with pulse_num is total, supposes
Figure S2007101539527D00061
Represent the position distribution in orbit of each pulse with distribution of pulses vector
Figure S2007101539527D00062
; Wherein, Q (h) h+1 pulse of expression position number in orbit;
Figure S2007101539527D00063
Figure S2007101539527D00064
M representes the total number of positions on the track in this article; General M can be 8,16 or the like.
In addition, need the pulse of coding also possibly have symbol, promptly have the characteristic of plus or minus, when on to track, needing this moment the pulse of coding to add up, also need obtain the impulse code information of each pulse according to the position.Among this paper,
The impulse code information of representing each pulse with impulse code vector ; Wherein, The impulse code of h+1 pulse of ss (h) expression is called the notation index of q (h) pulse, has or the two-value property of plus or minus based on the impulse code of ss (h) representative; Generally can adopt following simple coded system: with ss (h)=0 expression positive pulse, ss (h)=1 representes negative pulse.Certainly, for the pulse of needs coding, impulse code is not prerequisite characteristic, and according to actual needs, pulse can only have position and quantitative characteristics, need not to add up impulse code information this moment.
Obviously, the value in has relation one to one.
After the parameters
Figure S2007101539527D00071
of the pulse that the statistics acquisition need be encoded; Just need parameters be encoded to index; Set up the corresponding relation between parameter and the index, make decoding enough to recover corresponding parameters according to index.Corresponding relation can adopt two kinds of expression modes, and the one, with the calculated relationship that the algebraically mode is represented, in this case, coding staff carries out forward to parameter and calculates the acquisition index, and decoding Fang Ze carries out backwards calculation to index and obtains parameter; The one, with the query relation that mapping mode is represented, in this case, the encoding and decoding both sides need store the mapping table of relevant parameter and index.Two kinds of corresponding relations can be selected according to the concrete characteristics of parameter, generally speaking, under the big situation of data volume, design the memory space that the corresponding relation of representing with calculated relationship can be saved the encoding and decoding both sides as far as possible, are more favourable.Respectively the coding of parameters is described below.
A2, confirm distribution index I4; I4 calculates according to following mode: according to the order of setting; Under current pulse number
Figure S2007101539527D00072
; The position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging distribution index I4 as the corresponding distribution situation of indication.
Alleged " order of setting " can be regarded as the encoding and decoding both sides according to same sorting calculation rule, the order that determined
Figure S2007101539527D00073
all maybe situation.
Always possibly counting into
Figure S2007101539527D00075
wherein of distribution of pulses vector
Figure S2007101539527D00074
, number of combinations is asked in
Figure S2007101539527D00076
" C " expression.A kind of distribution of pulses situation in the corresponding indication of each I4
Figure S2007101539527D00077
Generally speaking
Figure S2007101539527D00078
data volume is bigger; Therefore adopt calculated relationship with corresponding relatively being fit to of distribution index I4, it also is feasible adopting query relation certainly.Obviously
Figure S2007101539527D00079
promptly is all possible value numbers of I4; If the value of I4 then has since 0 counting
A3, generate an encoded index?
Figure S2007101539527D000711
coding index?
Figure S2007101539527D000712
index I4 including distribution information.
I4 can decoded side's identification mode be placed in the code index with any, and is for example the simplest, deposits from the desired location of code index.
Certainly; In coded pulse is under the situation of tape symbol pulse;
Figure S2007101539527D000713
also need comprise the information of the notation index ss (h) of each pulse; Can simply impulse code vector
Figure S2007101539527D000714
be placed on the fixed position of code index as the field of length for , for example the end.
To sum up, a kind of make of code index
Figure S2007101539527D000716
can be expressed as:
Figure S2007101539527D000717
Be understood that easily; Above-mentioned code index make of giving an example is merely a kind of optional mode of present embodiment; Those skilled in the art can utilize the essential information that constitutes code index; Be easy to draw the make of other code index structures, for example carry out the exchange of index position or reconfigure etc., the concrete make of code index does not constitute the qualification to the embodiment of the invention.
For better understanding the make of code index among the embodiment one, enumerate some real example below and describe.Suppose the total number of positions M=16 on the track:
Example one, coding
Figure S2007101539527D00081
individual tape symbol pulse, the code index structure is as shown in Figure 2.
Code index Index (5) has 19 bits, and promptly Index (5) ∈ [0,2 19-1], the encoded radio scope of Index (5) is represented with the sexadecimal form among Fig. 2.Among this paper, before numerical value, represent that titled with " 0x " this numerical value is hexadecimal representation; Other numerical value are without specified otherwise, all with decimal representation.
Five notation index ss (0)~ss (4) takies 5 bits at end.
Use 14 bits to place I4 among Fig. 2, the space encoder length that therefore offers I4 is 2 14=16384, because WQ ( 5 ) = C 16 + 5 - 1 5 = 15504 , Obviously enough use.
Example two, coding
Figure S2007101539527D00083
individual tape symbol pulse, the code index structure is as shown in Figure 3.
Code index Index (4) has 16 bits, and promptly Index (4) ∈ [0,2 16-1].
Four notation index ss (0)~ss (3) takies 4 bits at end.
Use 12 bits to place I4 among Fig. 3, the space encoder length that therefore offers I4 is 2 12=4096, because WQ ( 4 ) = C 16 + 4 - 1 4 = 3876 , Obviously enough use.
Example three, coding
Figure S2007101539527D00085
individual tape symbol pulse, the code index structure is as shown in Figure 4.
Code index Index (3) has 13 bits, and promptly Index (3) ∈ [0,2 13-1].
Three notation index ss (0)~ss (2) takies 3 bits at end.
Use 10 bits to place I4 among Fig. 4, the space encoder length that therefore offers I4 is 2 10=1024, because WQ ( 3 ) = C 16 + 3 - 1 3 = 816 , Obviously enough use.
Embodiment two, a kind of coding method; Present embodiment adopts the codimg logic identical with embodiment one; Present embodiment mainly provides a kind of computing method to distribution index I4, makes to be convenient to confirm pulse distribution in orbit through algebraic manipulation: the corresponding relation of
Figure S2007101539527D00087
and I4.
The sorting calculation rule of
Figure S2007101539527D00088
as follows is provided in the present embodiment:
Because
Figure S2007101539527D00091
condition of different is that the different combinations of values of passing through to be comprised embody; Therefore might as well arrange order to each position number that comprises in
Figure S2007101539527D00092
:
Figure S2007101539527D00093
be perhaps
Wherein the position of equal sign indicating impulse can be repeated; Suppose to adopt the former, then have: q (0) ∈ [0, M], q (h) ∈ [q (h-1), M], M is the total number of positions on the track.Then to
Figure S2007101539527D00095
condition of different size of each dimension relatively successively, according to from small to large or order from big to small all possible
Figure S2007101539527D00096
sorted.
Suppose to adopt sortord from small to large; And since 0 to the ordering after
Figure S2007101539527D00097
number, then:
Figure S2007101539527D00098
Wherein number of combinations is asked in " C " expression; ∑ is represented summation.The meaning of the above formula can be interpreted as:?
Figure S2007101539527D00099
denotes a pulse in q (0) before?
Figure S2007101539527D000910
Total cases;?
Figure S2007101539527D000911
denotes a pulse in q (0), the first two pulses at q (1) before?
Figure S2007101539527D000912
the total number of cases;?
Figure S2007101539527D000913
meaning to analogy.Need to prove; Above-mentioned formula is a kind of form of expression of calculated relationship between I4 and
Figure S2007101539527D000914
; According to identical ordering rule, also can be of equal value with other mathematical form this calculated relationship is described; If adopt different ordering rules, also can design similar calculated relationship accordingly, the form of presentation of concrete calculated relationship does not constitute the qualification to the embodiment of the invention.
For better understanding the computing method of above-mentioned I4, can suppose that a pulse relative position vector
Figure S2007101539527D000915
Figure S2007101539527D000916
Figure S2007101539527D000917
and
Figure S2007101539527D000918
have following one-to-one relationship:
xx(1)=q(0);
xx(i)=q(i-1)-q(i-2);
Xx (i) expression be the relative position relation between the position of position and i-1 pulse of i pulse;
Figure S2007101539527D000919
Figure S2007101539527D000920
utilizes
Figure S2007101539527D000921
can be configured in
Figure S2007101539527D000922
all possible situation in one
Figure S2007101539527D000923
layer tree construction, and the child node of the degree of depth of tree tree i layer for
Figure S2007101539527D000924
is represented the relative position value xx (i) of i pulse.According to the value that from small to large order is from left to right placed xx (i), at the bottom of tree, promptly from left to right encode to each end-node successively in the end-node place then.Each end-node is to a kind of situation in the path corresponding
Figure S2007101539527D000925
of root node, so the coding of each end-node is the distribution index I4 of indication corresponding
Figure S2007101539527D000926
situation.
Lifting a real example below describes; Suppose the total number of positions M=16 on the track; tree construction is as shown in Figure 5, and corresponding distribution index computing 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
During other
Figure S2007101539527D00102
value situation; Corresponding tree construction is similar; The computing formula of I4 can be analogized, and repeats no more.
Present embodiment provides a kind of method with calculated relationship acquisition distribution index I4, because I4 shared data volume in code index is bigger, therefore adopts the present embodiment computing method can reduce encoding and decoding both sides' memory space as far as possible.Simultaneously; Because I4 continuous programming code and corresponding one by one with
Figure S2007101539527D00103
strictness; Therefore can utilize coded-bit to greatest extent, avoid waste.
Embodiment three, a kind of coding method; Present embodiment is compared the difference part and is with embodiment one; Present embodiment is regarded as first coded system with the cataloged procedure described in the embodiment one; In comprising the optional coded system of first coded system, select earlier, encode according to selected coded system again.Present embodiment coding method flow process is as shown in Figure 6, comprising:
B1, to need to confirm on the same track pulse sum
Figure S2007101539527D00104
of coding
Usually can confirm the pulse sum
Figure S2007101539527D00105
of needs coding according to encoder bit rate
B2, basis
Figure S2007101539527D00106
are carried out coding mode selection, and said coded system comprises first coded system; According to selection result execution in step B3 or B4.
Among this paper embodiment one described coded system is called first coded system.Optional coded system can also comprise other forms of coded system except first coded system, for example existing AMR_WB+ etc.A kind of second optional coded system will specifically be provided in the present embodiment.
Coded system is selected according to fixed
Figure S2007101539527D00107
value; For example; Can be provided with in advance and adopt first coded system to encode under some value situation, and under other
Figure S2007101539527D00109
value situation, adopt second coded system to encode.Research shows; At
Figure S2007101539527D001010
equivalent time, adopt the first coded system effect better.
B3, according to the result of coding mode selection, after confirming to select first coded system, encode according to first coded system.
The specific coding process can be carried out with reference to the description among the embodiment one.
B4, according to the result of coding mode selection, after confirming to select second coded system, encode according to second coded system, comprise the steps:
B41, the pulse that needs coding on the track is added up according to the position, obtain to have pulse position number, have pulse position distribution and each in orbit that the pulse number on the pulse position is arranged.
Among this paper,
The number of representing to have pulse position with pos_num; Because location overlap possibly appear in
Figure S2007101539527D00111
individual pulse distribution in orbit; Suppose pos_num=N,
Figure S2007101539527D00112
obviously arranged
With pulse position vector P (N)=p (0), p (1) ..., p (N-1) } expression has a pulse position distribution in orbit; Wherein, p (n) expression has pulse position position number in orbit, n ∈ [0, N-1], and p (n) ∈ [0, M-1], M representes the total number of positions on the track in this article, general M can be 8,16 or the like;
With pulse number vector S U (N)=su (0), su (1) ..., su (N-1) } represent that each has the pulse number on the pulse position; Wherein, The pulse number of su (n) expression p (n) position obviously has
Figure S2007101539527D00113
Figure S2007101539527D00114
In addition; Need the pulse of coding also possibly have symbol, promptly have the characteristic of plus or minus, when on to track, needing this moment the pulse of coding to add up according to the position; Also need obtain each impulse code information that pulse position is arranged (generally speaking; Be positioned at the pulse of same position, its impulse code is identical, therefore can represent the symbolic information of this locational pulse with the impulse code information that pulse position is arranged).Among this paper,
With position symbol vector S (N)=s (0), s (1) ..., s (N-1) } represent the impulse code information that each has pulse position; Wherein, The impulse code of s (n) expression p (n) position is called the notation index of p (n) position, has or the two-value property of plus or minus based on the impulse code of s (n) representative; Generally can adopt following simple coded system: with s (n)=0 expression positive pulse, s (n)=1 representes negative pulse.Certainly, for the pulse of needs coding, impulse code is not prerequisite characteristic, and according to actual needs, pulse can only have position and quantitative characteristics, need not to add up impulse code information this moment.
Obviously, the value among P (N), SU (N), the S (N) has relation one to one.
Behind the parameters N of the pulse that statistics acquisitions need to be encoded, P (N), SU (N), S (N), just need parameters be encoded to index, set up the corresponding relation between parameter and the index, make decoding enough to recover corresponding parameters according to index.Corresponding relation can adopt two kinds of expression modes, and the one, with the calculated relationship that the algebraically mode is represented, in this case, coding staff carries out forward to parameter and calculates the acquisition index, and decoding Fang Ze carries out backwards calculation to index and obtains parameter; The one, with the query relation that mapping mode is represented, in this case, the encoding and decoding both sides need store the mapping table of relevant parameter and index.Two kinds of corresponding relations can be selected according to the concrete characteristics of parameter, generally speaking, under the big situation of data volume, design the memory space that the corresponding relation of representing with calculated relationship can be saved the encoding and decoding both sides as far as possible, are more favourable.Respectively the coding of parameters is described below.
B42, confirm the first index I1 according to the number pos_num=N that pulse position is arranged, the first index I1 is corresponding under the identical pos_num, and pulse position whole possible distribution situations are in orbit arranged.
The numerical value of N variation range of pos_num is little, and therefore corresponding employing calculated relationship or the query relation with the first index I1 all is feasible.When setting up the corresponding relation of pos_num and I1, generally can make them and have relation one to one; Certainly, if under some pos_num numerical value, the index of other parameters only needs less bit number, and these pos_num also can merge I1 of use, distinguish through extra market bit again.
The numerical value of N of pos_num has determined the total W (N) that P (N) all maybe situation, and number of combinations is asked in " C " expression; Therefore an I1 is corresponding to the individual possible P of W (N) (N).
B43, according to there being pulse position distribution P (N) in orbit to confirm the second index I2, the second index I2 indicates and the current corresponding distribution situation of distribution that pulse position is arranged from the corresponding whole possible distribution situation of the first index I1.
Always possibly counting of P (N) does W ( N ) = C M N , Data volume is bigger, therefore adopts calculated relationship with corresponding relatively being fit to of the second index I2, and it also is feasible adopting query relation certainly.Obviously W (N) promptly is all possible value numbers of I2, if the value of I2 then has I2 ∈ [0, W (N)-1] since 0 counting.
B44, there is the pulse number SU (N) on the pulse position to confirm the 3rd index I3 according to each.
SU (N) is though be and the vector of P (N) with dimension; But the numerical value that is subject to
Figure S2007101539527D00123
and
Figure S2007101539527D00125
is little usually; Be generally 1~6; Therefore SU (N) always possibly count not quite, all be feasible with corresponding employing calculated relationship or the query relation of the 3rd index I3.And,, under high-dimensional situation, adopt query relation comparatively suitable in view of its vector form; Design hanging down calculated relationship under the dimension situation is more or less freely, and then dual mode all can adopt.Need to prove; Under some extreme case; For example N=1 or
Figure S2007101539527D00126
SU this moment (N) has only a kind of possibility situation; Need not indicate by concrete I3, can I3 be regarded as not influencing the arbitrary value that final code index generates.
B45; Generate code index
Figure S2007101539527D00127
code index
Figure S2007101539527D00128
and comprise first; Two; Three index I1; I2; The information of I3.
I1, I2, I3 can decoded side's identification mode be placed in the code index with any, and be for example the simplest, can leave in separately in the fixing field respectively.Consider under the certain prerequisite of the pulse sum pulse_num that needs coding on the same track; The numerical value of N of the pos_num of I1 indication has determined the variation range of I2 and I3; That is, determine the number of coded bits that I2 and I3 need, therefore can adopt following mode to construct code index:
1. be initial value with the first index I1, the information of other index that superpose; The value of I1 is corresponding to one of code index span independently; Like this, decoding side just can directly confirm the numerical value of N of pos_num according to the span of code index;
2. further, in the span that I1 delimit (usually corresponding to certain field length), I2, I3 can decoded side's identification mode place with any, and be for example the simplest, can deposit separately respectively.Because I2, I3 generally can not be expressed as 2 integer power, for saving coded-bit as far as possible, can I2, I3 be combined as following form and be placed in the span that I1 delimit:
I 23 = I 3 × W ( N ) + I 2 = I 3 × C M N + I 2
I2, I3 all since 0 the coding, I 2 ∈ [ 0 , C M N - 1 ] , I3 ∈ [0, Class (N)-1], Class (N) always possibly count for SU's (N).Obviously, it is the part of W (N) that this mode is equivalent to the span that I1 delimit is divided into the individual length of Class (N), a kind of distribution situation of the corresponding SU of each part (N).
3. certain; In coded pulse is under the situation of tape symbol pulse; also need comprise the information of each impulse code index s (n); Can be simply be that the field of N is placed on the fixed position of code index with position symbol vector S (N) as length, end for example.
To sum up, a kind of make of code index
Figure S2007101539527D00134
can be expressed as:
Figure S2007101539527D00135
Be understood that easily; Above-mentioned code index make of giving an example is merely a kind of optional mode of present embodiment; Those skilled in the art can utilize the essential information that constitutes code index; Be easy to draw the make of other code index structures, for example carry out the exchange of index position or reconfigure etc., the concrete make of code index does not constitute the qualification to the embodiment of the invention.
The codimg logic that second coded system provides can consistently adopt for the different coding pulse number, has avoided adding up of code index redundance under the recursive fashion that AMR_WB+ adopted, and makes full use of coded-bit from total logic design assurance.Simultaneously owing to avoided a plurality of pulses of same position are encoded respectively; Make the embodiment of the invention carry out merging back, position Methods for Coding and have the advantage of saving coded-bit; And increase along with coded pulse number on the track; The probability that pulse position overlaps also increases thereupon, and the advantage of embodiment of the invention method is obvious further.
For better understanding the make of code index in second coded system, enumerate some real example below and describe.Suppose the total number of positions M=16 on the track, and number pos_num and the first index I1 that pulse position arranged are relation one to one:
Example one, coding
Figure S2007101539527D00141
individual tape symbol pulse, the code index structure is as shown in Figure 7.
Code index Index (6) has 21 bits, and promptly Index (6) ∈ [0,2 21-1], expresses under the different value condition of pos_num the shared bit number of each several part index that Index (6) is comprised among Fig. 7 respectively.For clarity sake, below represent respectively that with I1 (N), I2 (N), I3 (N), I23 (N) N is this index under the specific value.Definite employing mapping mode of I1 (N) is respectively,
I1(1)=0x1F0000,I1(2)=0x1E0000,I1(3)=0x1D0000,
I1(4)=0x180000,I1(5)=0x000000,I1(6)=0x100000。
Make a concrete analysis of explanation in the face of Fig. 7 down.
When 1. 6 pulses are on 1 position, N=1, possibly making up of SU (1) is as shown in Figure 8;
W(1)=1?6,I2(1)∈[0,15],
SU(1)={6},Class(1)=1,I3(1)=0,
So I23 (1)=I2 (1) ∈ [0,15];
A notation index s (0) takies 1 bit at end,
The space encoder length that I1 (1) offers I23 (1) is [2 21-I1 (1)]/2 1=32768, obviously enough use.
When 2. 6 pulses are on 2 positions, N=2, possibly making up of SU (2) is as shown in Figure 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],
So I23 (2)=I3 (2) * 120+I2 (2) ∈ [0,599];
Two notation index s (0), s (1) take 2 bits at end,
The space encoder length that I2 (2) offers I23 (2) is [I1 (1)-I1 (2)]/2 2=16384, obviously enough use.
When 3. 6 pulses are on 3 positions, N=3, possibly making up of SU (3) is shown in figure 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],
So I23 (3)=I3 (3) * 560+I2 (3) ∈ [0,5599];
Three notation index s (0)~s (2) takies 3 bits at end,
The space encoder length that I2 (3) offers I23 (3) is [I1 (2)-I1 (3)]/2 3=8192, obviously enough use.
When 4. 6 pulses are on 4 positions, N=4, possibly making up of SU (4) is shown in figure 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],
So I23 (4)=I3 (4) * 1820+I2 (4) ∈ [0,18199];
Four notation index s (0)~s (3) takies 4 bits at end,
The space encoder length that I2 (4) offers I23 (4) is [I1 (3)-I1 (4)]/2 4=20480, obviously enough use.
When 5. 6 pulses are on 5 positions, N=5, possibly making up of SU (5) is shown in figure 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],
So I23 (5)=I3 (5) * 4368+I2 (5) ∈ [0,21839];
Five notation index s (0)~s (4) takies 5 bits at end,
The space encoder length that I2 (5) offers I23 (5) is [I1 (6)-I1 (5)]/2 5=32768, obviously enough use.
When 6. 6 pulses are on 6 positions, N=6, possibly making up of SU (6) is shown in figure 13;
W(6)=8008,I2(6)∈[0,8007],
SU(6)={1,1,1,1,1,1},Class(6)=1,I3(6)=0,
So I23 (6)=I2 (6) ∈ [0,8007];
Six notation index s (0)~s (5) takies 6 bits at end,
The space encoder length that I2 (6) offers I23 (6) is [I1 (4)-I1 (6)]/2 6=8192, obviously enough use.
Example two, coding
Figure S2007101539527D00161
individual tape symbol pulse, the code index structure is shown in figure 14.
Code index Index (5) has 19 bits, and promptly Index (5) ∈ [0,2 19-1].Express under the different value condition of pos_num the shared bit number of each several part index that Index (5) is comprised among Figure 14 respectively.Definite employing mapping mode of I1 (N) is respectively,
I1(1)=0x78000,I1(2)=0x70000,I1(3)=0x60000,
I1(4)=0x40000,I1(5)=0x00000。
Can copy Fig. 7 to carry out to the concrete analysis of Figure 14, repeat no more at this.
Example three, coding individual tape symbol pulse, the code index structure is shown in figure 15.
Code index Index (4) has 16 bits, and promptly Index (4) ∈ [0,2 16-1].Express under the different value condition of pos_num the shared bit number of each several part index that Index (4) is comprised among Figure 15 respectively.Definite employing mapping mode of I1 (N) is respectively,
I1(1)=0xE000,I1(2)=0xC000,I1(3)=0x8000,I1(4)=0x0000。
Can copy Fig. 7 to carry out to the concrete analysis of Figure 15, repeat no more at this.
Example four, coding
Figure S2007101539527D00163
individual tape symbol pulse, the code index structure is shown in figure 16.
Code index Index (3) has 13 bits, and promptly Index (3) ∈ [0,2 13-1].Express under the different value condition of pos_num the shared bit number of each several part index that Index (3) is comprised among Figure 16 respectively.Definite employing mapping mode of I1 (N) is respectively,
I1(1)=0x1C00,I1(2)=0x1800,I1(3)=0x0000。
Can copy Fig. 7 to carry out to the concrete analysis of Figure 16, repeat no more at this.
Example five, coding
Figure S2007101539527D00164
individual tape symbol pulse, the code index structure is shown in figure 17.
Code index Index (2) has 9 bits, and promptly Index (2) ∈ [0,2 9-1].Express under the different value condition of pos_num the shared bit number of each several part index that Index (2) is comprised among Figure 17 respectively.Definite employing mapping mode of I1 (N) is respectively,
I1(1)=0x1E0,I1(2)=0x000。
Can copy Fig. 7 to carry out to the concrete analysis of Figure 17, repeat no more at this.
Example six, coding
Figure S2007101539527D00171
individual tape symbol pulse, the code index structure is shown in figure 18.
Code index Index (1) has 5 bits, and promptly Index (1) ∈ [0,2 5-1].Since N ≡ 1, so among Figure 18, Index (2) only comprises index I23 (1)=I2 (1), and the notation index s (0) of p (0).
Embodiment four, a kind of coding method; Present embodiment adopts the codimg logic identical with embodiment three; Present embodiment mainly provide a kind of in second coded system computing method to the second index I2, make and to be convenient to define pulse position distribution in orbit: P (N)={ p (0), p (1) through algebraic manipulation; ..., p (N-1) } with the corresponding relation of I2.
The computing method of I2 are in the present embodiment, and according to the order of setting, under the corresponding number N that pulse position is arranged of the first index I1, P (N) all possible situation arranges, with the sequence number of the arranging second index I2 as the corresponding distribution situation of indication.
" order of setting " can be regarded as the encoding and decoding both sides according to same sorting calculation rule, the order that determined P (N) all maybe situation.Following sorting calculation rule is provided in the present embodiment:
Because P (N) condition of different is that the different combinations of values of passing through to be comprised embody, therefore might as well arrange order to each position number that comprises among the P (N):
P (0)<p (1)<...<p (N-1), perhaps p (0)>p (1)>...>p (N-1);
Suppose to adopt the former, then have: p (0) ∈ [0, M-N], p (n) ∈ [p (n-1)+1, M-N+n], M is the total number of positions on the track.Then to P (N) the condition of different size of each dimension relatively successively, according to from small to large or order from big to small all possible P (N) is sorted.
Suppose to adopt sortord from small to large, and number since 0 to the P (N) after the ordering, then:
I 2 = C M N - C M - p ( 0 ) N + Σ n - 1 N - 1 [ C M - p ( n - 1 ) - 1 N - n - C M - p ( n ) N - n ]
Wherein number of combinations is asked in " C " expression; ∑ is represented summation.The implication of following formula may be interpreted as: C M N-C M-p (0) NRepresent that the 1st pulse is positioned at p (0) P (N) situation sum before; C M-p (0)-1 N-1-C M-p (1) N-1When representing that the 1st pulse is positioned at p (0), the 2nd pulse is positioned at p (1) P (N) situation sum before; C M-p (n-1)-1 N-n-C M-p (n) N-nImplication can analogize.Need to prove that above-mentioned formula is a kind of form of expression of calculated relationship between I2 and P (N), according to identical ordering rule, also can be of equal value with other mathematical form this calculated relationship is described; If adopt different ordering rules, also can design similar calculated relationship accordingly, the form of presentation of concrete calculated relationship does not constitute the qualification to the embodiment of the invention.
Be better to understand the computing method of above-mentioned I2, can suppose a pulse relative position vector X (N)=x (1), x (2) ..., x (N) }, X (N) and P (N) have following one-to-one relationship:
x(1)=p(0);
x(i)=p(i-1)-p(i-2);
Being i and having that pulse position and i-1 are individual to have a relative position relation between the pulse position, i ∈ [1, N] of x (i) expression.Utilize X (N) can all possible situation of P (N) be configured in the N layer tree construction, the degree of depth of tree is N+1, sets the child node of i layer and representes i the relative position value x (i) that pulse position is arranged.According to the value that from small to large order is from left to right placed x (i), at the bottom of tree, promptly from left to right encode to each end-node successively in the end-node place then.Each end-node is to a kind of situation of the corresponding X in path (N) of root node, so the coding of each end-node is the second index I2 of indication corresponding P (N) situation.
Enumerate some real example below and describe, suppose the total number of positions M=16 on the track.
Example one, the value N=2 of the number pos_num of pulse position is arranged, tree construction is shown in figure 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=3 of the number pos_num of pulse position is arranged, tree construction is shown in figure 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
As N=4,5,6 the time, corresponding tree construction is similar, and the computing formula of I2 can be analogized, and repeats no more.
Present embodiment provides a kind of and has obtained the method for the second index I2 with calculated relationship, because I2 shared data volume in code index is bigger, therefore adopts the present embodiment computing method can reduce encoding and decoding both sides' memory space as far as possible.Simultaneously, because therefore I2 continuous programming code and corresponding one by one with P (N) strictness can utilize coded-bit to greatest extent, avoid waste.
Below, the advantage of code index make in above-mentioned first coded system and second coded system is analyzed.In theory, need under the certain prerequisite of the pulse sum pulse_num of coding all pulses whole possible permutation and combination number in orbit on the same track; It is exactly the minimum span of code index; The corresponding codes bit number is the theory lower bound value thus, and when the permutation and combination number was 2 integer power, the theory lower bound value of number of coded bits was an integer; When the permutation and combination number can not be expressed as 2 integer power; The theory lower bound value of number of coded bits is a decimal, at this moment, has certain coding redundancy.During total number of positions M=16 on the track; Under different pulse_num values; To the theory lower bound value of number of coded bits, the number of coded bits that adopts the AMR_WB+ coded system to need; And adopt the bit number that the code index make needs in first coded system and second coded system to compare, as shown in table 1:
Table 1
Figure S2007101539527D00191
Can learn that by table 1 contrast the code index make of second coded system can reach the theory lower bound value when theoretical lower limit is integer; When theoretical lower limit was decimal, the integral part that reaches the theory lower bound value added one.First coded system has the coded-bit length identical with second coded system when .These two kinds of coded systems are under the situation of high code check, and code efficiency is higher than AMR_WB+, promptly save bit more.
Aspect computation complexity; The whole cycle testss that move with AVS-M in the identifying code of audio standard are tested object, the run time statistics of AMR_WB+, first coded system and second coded system are compared (travel through all sample spaces, comprise the Code And Decode process; First coded system adopts the account form among the embodiment two; Second coded system adopts the account form among the embodiment four, and the corresponding manner that provides in the subsequent implementation example is adopted in decoding), as shown in table 2:
Table 2
Can learn that by table 2 contrast first coded system in most of the cases has lower computational complexity, the computational complexity of second coded system is then suitable with the AMR_WB+ mode.Can find out through table 1 and table 2; Comprehensive first coded system and second coded system used; When
Figure S2007101539527D00202
, utilize the low computation complexity of first coded system, under other value situation, utilize the low coded-bit length of second coded system can reach good effect.
Coding/decoding method in the face of the embodiment of the invention is elaborated down.
Embodiment five, a kind of coding/decoding method, the coding/decoding method that present embodiment provides is decoded to the code index that obtains according to embodiment one coding method, and decode procedure is the anti-process of cataloged procedure, and is shown in figure 21, comprising:
C1, received code index
Figure S2007101539527D00204
C2, from code index
Figure S2007101539527D00205
, extract distribution index I4.
From
Figure S2007101539527D00206
, extract distribution index I4, can I4 be constructed into opposite process according to coding the time and carry out.For example, if in the field of the setting that I4 deposits, then directly extraction gets final product.
If coding is the tape symbol pulse, then also need from
Figure S2007101539527D00208
, extract and each pulse corresponding symbol index ss (h).Because under the different code checks; Total bit number of code index is different; Therefore decoding can be determined the pulse sum
Figure S2007101539527D00209
of encoding on the same track extracts respective number then from
Figure S2007101539527D002011
according to
Figure S2007101539527D002010
notation index ss (h) directly according to the length (bit number) of code index.According to
Figure S2007101539527D00211
structure that provides among the embodiment one;
Figure S2007101539527D00212
individual notation index is positioned at
Figure S2007101539527D00213
end, therefore can directly from
Figure S2007101539527D00214
, isolate each ss (h).
C3, confirm the position distribution
Figure S2007101539527D00215
in orbit of each pulse according to distribution index I4
Decoding I4 adopts the opposite process with coding I4, if I4 adopts calculated relationship to obtain when coding, then when decoding, utilizes same calculated relationship to carry out inverse operation and gets final product; If I4 adopts query relation to obtain when coding, then the identical corresponding relation of inquiry gets final product when decoding.
C4, rebuild the pulse train on the track according to the distribution
Figure S2007101539527D00216
in orbit of the position of each pulse.
For the situation of tape symbol pulse, during pulse train on rebuilding track, the impulse code information of also carrying according to each notation index ss (h) is recovered the characteristic of plus or minus of the impulse code of each pulse.
Embodiment six, a kind of coding/decoding method; Present embodiment adopts the decode logic identical with embodiment five; Present embodiment mainly provides a kind of computing method that the distribution index I4 that obtains according to embodiment two coding methods is decoded, and the contrary computing method of the computing method of I4 among the embodiment two in decoding side promptly are provided.
For when encoding, according to:
I 4 = C PPT N - C PPT - q ( 0 ) N + Σ h = 1 N - 1 [ C PPT - h - q ( h - 1 ) N - h - C PPT - h - q ( h ) N - h ] The I4 that obtains, adopt when decoding:
1. calculate
Figure S2007101539527D00218
successively wherein according to q (0) order from small to large; Q (0) ∈ [0; M]; M is the total number of positions on the track;
Figure S2007101539527D00219
pulse sum for encoding on the same track, number of combinations is asked in " C " expression; Writing down last makes T [q (0)] greater than the position number v0 of zero q (0) value as the 1st pulse on the track;
2. if
Figure S2007101539527D002111
then continues to calculate
Figure S2007101539527D002112
successively wherein according to q (1) order from small to large; Q (1) ∈ [v0, M]; Writing down last makes T1 [q (1)] greater than the position number v1 of zero q (1) value as the 2nd pulse on the track;
3. by that analogy; Calculate
Figure S2007101539527D002114
Figure S2007101539527D002115
successively wherein according to q (h) order from small to large; Q (h) ∈ [v (h-1); M],
Figure S2007101539527D002116
writes down last makes Th [q (h)] greater than the position number vh of zero q (h) value as h+1 pulse on the track.
4. the I4 that decodes accomplishes, and obtains
Figure S2007101539527D002117
Embodiment seven, a kind of coding/decoding method, the coding/decoding method that present embodiment provides is decoded to the code index that obtains according to embodiment three coding methods, and decode procedure is the anti-process of cataloged procedure, and is shown in figure 22, comprising:
D1, determine the received coded index?
Figure S2007101539527D00221
at the same total number of pulses encoded on the track?
Figure S2007101539527D00222
Decoding can be directly according to the length (bit number) of code index; It is certain to determine the pulse sum
Figure S2007101539527D00223
of encoding on the same track; Decoding side also can be through promptly knowing
Figure S2007101539527D00224
value (for example the information interaction through both sides is known before the received code index) that code index is corresponding with the mode of coding staff agreement before the received code index, present embodiment is not done qualification to the mode of specifically knowing of
Figure S2007101539527D00225
.
D2, basis
Figure S2007101539527D00226
are carried out the decoding process selection, and said decoding process comprises first decoding process; According to selection result execution in step D3 or D4.
Among this paper embodiment five described decoding processes are called first decoding process.Optional decoding process can also comprise other forms of decoding process except first decoding process, various optional decoding processes need be corresponding with the coded system that coding staff provides.Second decoding process corresponding with aforementioned second coded system will specifically be provided in the present embodiment.
Decoding side should adopt with the corresponding rule of coding staff and select decoding process, guarantees the consistance of code encoding/decoding mode.
D3, according to the result that decoding process is selected, after confirming to select first decoding process, decode according to first decoding process.Carry out the said step that from code index, extracts distribution index.
Concrete decode procedure can be carried out with reference to the description among the embodiment five.
D4, according to the result that decoding process is selected, after confirming to select second decoding process, decode according to second decoding process, comprise the steps:
D41, from
Figure S2007101539527D00227
, extract the first index I1, define the number pos_num of pulse position according to I1.
Because under the different code checks; Total bit number of code index is different; Therefore decoding can be determined the pulse sum
Figure S2007101539527D00228
of encoding on the same track directly according to the length (bit number) of code index
From , extract the information of each index, can synthetic
Figure S2007101539527D002210
the opposite process of each index-group be carried out according to coding the time.For example, if in the fixing field that each index is deposited separately, then directly extract respectively and get final product.
if
Figure S2007101539527D00231
adopt provide among the embodiment three with the structure of I1 as other index of initial value stack; Then can extract I1 earlier, confirm the position of other index in according to the value N of the pos_num corresponding with I1.In this case; A because independent span of an I1 correspondence
Figure S2007101539527D00233
; Therefore; Decoding can from set several independently the span; Judge the span under
Figure S2007101539527D00234
, confirm the first index I1 according to the initial value that the span under this is corresponding.
D42, from code index
Figure S2007101539527D00235
, extract second and third index I2, I3;
Similar with I1; The extraction of I2, I3 also according to be combined into
Figure S2007101539527D00236
opposite process and carry out, when independent the placement, can directly be extracted.If I2, I3 adopt the coded system that superposes after the combination among the embodiment three, then can adopt following steps to separate:
1. from code index
Figure S2007101539527D00237
, extract the combined value I23 of I2, I3;
The deposit position of I23 in can be indicated by the N value that I1 confirms.
2. isolate I2, I3 according to following mode,
I2=I23%W(N),I3=Int[I23/W(N)];
Wherein, W (N) is under the pos_num=N, and P (N) is the sum of possible situation all, W ( N ) = C M N , M is the total number of positions on the track; % representes to get remainder; Int representes to round.
D43, if the coding be the tape symbol pulse, then also need from
Figure S2007101539527D002310
, extract with each has pulse position corresponding symbol index s (n).
According to
Figure S2007101539527D002311
structure that provides among the embodiment three; N notation index is positioned at
Figure S2007101539527D002312
end, therefore after the N value that obtains by the I1 indication, can directly from
Figure S2007101539527D002313
, isolate each s (n).
D44, definite according to the second index I2 under pos_num=N, has pulse position distribution P (N) in orbit;
Decoding I2 adopts the opposite process with coding I2, if I2 adopts calculated relationship to obtain when coding, then when decoding, utilizes same calculated relationship to carry out inverse operation and gets final product; If I2 adopts query relation to obtain when coding, then the identical corresponding relation of inquiry gets final product when decoding.
D45, confirm that according to the 3rd index I3 each has the pulse number SU (N) on the pulse position; Principle and the I2 of decoding I3 are similar.
D46, according to there being pulse position distribution P (N) and each in orbit that the pulse number SU (N) on the pulse position is arranged, rebuild the pulse train on the track.
For the situation of tape symbol pulse, during pulse train on rebuilding track, the impulse code information of also carrying according to each notation index s (n) is recovered the characteristic of the plus or minus of each impulse code that pulse position is arranged.
Embodiment eight, a kind of coding/decoding method; Present embodiment adopts the decode logic identical with embodiment seven; Present embodiment mainly provide a kind of in second decoding process second index I2 to obtaining according to embodiment four coding methods; The computing method of decoding promptly provide the contrary computing method in decoding side of the computing method of I2 among the embodiment four.
For when encoding, according to I 2 = C M N - C M - p ( 0 ) N + Σ n = 1 N - 1 [ C M - p ( n - 1 ) - 1 N - n - C M - p ( n ) N - n ] The I2 that obtains, adopt when decoding:
1. from I2, deduct C one by one M-1 N-1..., C M-y0 N-1,
R ( y 0 ) = I 2 - C M - 1 N - 1 - . . . - C M - y 0 N - 1 ;
Become negative up to the residual value R of I2 (y0) by positive number; Wherein, M is the total number of positions on the track, and N is the number that pulse position is arranged, y0 ∈ [1, M-N+1], and number of combinations is asked in " C " expression; The 1st position number p (0)=y0-1 that pulse position is arranged on the track record;
2. as if N>1, then continue from R [p (0)], to deduct C one by one M-p (0)-1 N-2..., C M-p (0) y1 N-2, become negative by positive number up to the residual value R1 (x1) of R [p (0)]; The 2nd position number p (1)=y1-1 that pulse position is arranged on the track record;
3. by that analogy, from R (n-1) [p (n-1)], deduct C one by one M-p (0)-...-p (n-1)-1 N-n-2..., C M-p (0)-...-p (n-1)-yn N-n-2, become negative by positive number up to the residual value Rn (yn) of R (n-1) [p (n-1)]; Wherein, n≤N-1; N+1 position number p (n)=yn-1 that pulse position is arranged on the track record.
4. the I2 that decodes accomplishes, acquisition P (N)=p (0), p (1) ..., p (N-1) }.
Should be appreciated that the software of realizing decoding method of the present invention can be stored in the computer-readable medium.
Encoding software when carrying out, comprise the steps: to obtain the position distributed intelligence in orbit of each pulse to needing the pulse of coding to add up on the track according to the position; Confirm distribution index; Said distribution index calculates according to following mode: according to the order of setting; Under current pulse number, the position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging distribution index as the corresponding distribution situation of indication; Generate code index, said code index comprises the information of said distribution index.
Decoding software when carrying out, comprise the steps: the received code index; From said code index, extract distribution index; Confirm the position distribution in orbit of each pulse according to said distribution index; The pulse train on the track is rebuild in position distribution in orbit according to each pulse.
Described computer-readable recording medium, as: ROM/RAM, magnetic disc, CD etc.
Codec in the face of the embodiment of the invention is elaborated down.
Embodiment nine, a kind of scrambler 10, shown in figure 23, comprising:
First statistic unit 11; Be used for the pulse of needs coding on the track is added up according to the position; The position distributed intelligence
Figure S2007101539527D00251
in orbit that obtains each pulse is when pulse is added up to tape symbol; First statistic unit 11 is also according to the characteristic of the plus or minus of the impulse code of each pulse, and output is indicated with the said notation index of the information
Figure S2007101539527D00252
of each pulse corresponding symbol index and the impulse code information of the pulse that this index is corresponding;
Distribution index unit 12; Be used for confirming distribution index I4 according to
Figure S2007101539527D00253
; I4 calculates according to following mode: according to the order of setting; Under current pulse number; The position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging I4 as the corresponding distribution situation of indication;
Index generation unit 13 is used to generate the information that code index
Figure S2007101539527D00254
Figure S2007101539527D00255
comprises distribution index I4; When the pulse of coding tape symbol, index generation unit 13 also will be combined in
Figure S2007101539527D00257
with the information
Figure S2007101539527D00256
of each pulse corresponding symbol index.
The present embodiment code device can be used in the coding method that embodiment one and two provides.
Embodiment ten, a kind of scrambler 20, shown in figure 24, comprise first coding module 21, second coding module 22 and coding selected cell 23,
Coding selected cell 23; Be used for confirming that the pulse sum
Figure S2007101539527D00258
of needs coding on the same track carries out coding mode selection according to
Figure S2007101539527D00259
, optional coded system comprises first coded system and second coded system in the present embodiment; According to the result of said coding mode selection, after confirming to select first coded system, trigger first coding module 21 and begin to carry out coding, after confirming to select second coded system, trigger second coding module 22 and begin to carry out coding.
First coding module 21 comprises first statistic unit 211, distribution index unit 212, index generation unit 213, and is identical with cellular logic structure of the same name among the embodiment nine.
Second coding module 22 comprises:
Second statistic unit 221 is used for the pulse of needs coding on the track is added up according to the position, output have pulse position number N, have pulse position distribution P (N) and each in orbit that the pulse number SU (N) on the pulse position is arranged; When pulse was added up to tape symbol, second statistic unit 221 also according to each characteristic of plus or minus that impulse code of pulse position is arranged, was exported corresponding impulse code information S (N);
Index calculating 222 comprises:
First indexing units 2221 is used for exporting the first index I1 according to the number N that pulse position is arranged, and I1 is corresponding under the identical number that pulse position arranged, and pulse position whole possible distribution situations are in orbit arranged;
Second indexing units 2222 is used for according to pulse position distribution P (N) the output second index I2 is in orbit arranged, and I2 indicates and the current corresponding distribution situation of distribution that pulse position is arranged from the corresponding whole possible distribution situation of said first index;
The 3rd indexing units 2223 is used for according to each pulse number SU (N) output the 3rd index I3 on pulse position being arranged;
Index assembled unit 223, the information that is used to make up said first, second and third index generates code index; When coding tape symbol pulse, index assembled unit 223 also will with each information S (N) that pulse position corresponding symbol index is arranged, be combined in the said code index said notation index indication the impulse code information that pulse position arranged corresponding with this index.
When the code index structure that second coded system provides in according to embodiment three was encoded, index assembled unit 223 can adopt following structure, comprising:
First assembled unit 2231 is used to export second and third index that is combined as I23,
I23=I3×W(N)+I2;
Wherein, W (N) is under the corresponding number N that pulse position is arranged of first index, and pulse position whole sum of possible distribution situation is in orbit arranged.
Second assembled unit 2232; Be used for the output of first assembled unit 2231 and the information stack of other index, output encoder index
Figure S2007101539527D00261
The present embodiment code device can be used in the coding method that embodiment three and four provides.
Embodiment 11, a kind of demoder 30, shown in figure 25, comprising:
Input block 31 is used for received code index
Figure S2007101539527D00262
Distribution extraction unit 32 is used for extracting distribution index I4 from code index
Figure S2007101539527D00271
;
Distribution solution code element 33 is used for confirming according to distribution index
Figure S2007101539527D00272
the position distribution
Figure S2007101539527D00273
in orbit of each pulse
Distribution reconstruction unit 34 is used for rebuilding the pulse train on the track according to the position distribution
Figure S2007101539527D00274
in orbit of each pulse.
When the pulse of decoding tape symbol, demoder also need comprise:
Symbol extraction unit 35 is used for extracting from code index
Figure S2007101539527D00276
according to the pulse of encoding on same track sum
Figure S2007101539527D00275
the impulse code information of the pulse corresponding with the said notation index indication of each pulse corresponding symbol index
Figure S2007101539527D00277
and this index;
The also impulse code information of indication according to of reconstruction unit 34 that distributes this moment is recovered the characteristic of plus or minus of the impulse code of each pulse.
The present embodiment decoding device can be used in the coding/decoding method that embodiment five and six provides.
Embodiment 12, a kind of demoder 40, shown in figure 26, comprise first decoder module 41, second decoder module 42 and decoding selected cell 43:
Decoding selected cell 43; The pulse sum
Figure S2007101539527D002710
that the code index
Figure S2007101539527D00279
that is used for confirm receiving is encoded on same track carries out decoding process to be selected according to
Figure S2007101539527D002711
, and optional decoding process comprises first decoding process and second decoding process in the present embodiment; According to the result that said decoding process is selected, after confirming to select first decoding process, trigger first decoder module 41 and begin to carry out decoding, after confirming to select second decoding process, trigger second decoder module 42 and begin to carry out decoding.
First decoder module 41 comprises distribution extraction unit 412, distribution solution code element 413, distribution reconstruction unit 414, symbol extraction unit 415, and is identical with cellular logic structure of the same name among the embodiment 11.
Second decoder module 42 comprises:
First extraction unit 421; Be used for received code index
Figure S2007101539527D002712
and extract the first index I1, define the number N of pulse position according to I1 from
Figure S2007101539527D002713
;
Second extraction unit 422 is used for extracting second and third index I2, I3 from code index
Figure S2007101539527D002714
;
When the code index structure that second coded system provides in to embodiment three was decoded, second extraction unit 422 can adopt following structure, comprising:
Segregant unit 4221 is used for extracting from code index the combined value I23 of second and third index;
Resolve subelement 4222, be used for separating second and third index of output I2, I3 according to following mode,
I2=I23%W(N),I3=Int[I23/W(N)];
Wherein W (N) is under the corresponding number N that pulse position is arranged of first index, and pulse position whole sum of possible distribution situation is in orbit arranged; % representes to get remainder; Int representes to round.
First decoding unit 423 is used for confirming according to the second index I2, under the corresponding number N that pulse position is arranged of I1, pulse position distribution P (N) is in orbit arranged;
Second decoding unit 424 is used for confirming that according to the 3rd index I3 each has the pulse number SU (N) on the pulse position;
Pulse reconstruction unit 425 is used for rebuilding the pulse train on the track according to there being pulse position distribution P (N) and each in orbit that the pulse number SU (N) on the pulse position is arranged.
When the pulse of decoding tape symbol, demoder also need comprise:
The 3rd extraction unit 426; Be used for according to the number N that pulse position is arranged; From
Figure S2007101539527D00281
, extracting with each has pulse position corresponding symbol index s (n), said notation index indication the impulse code information that pulse position arranged corresponding with this index;
At this moment, pulse reconstruction unit 425 can adopt following structure, comprising:
First reconstruction unit 4251, be used for according to have pulse position in orbit distribution P (N) and with each pulse position corresponding symbol index s (n) is arranged, recover the characteristic of the plus or minus of each impulse code that pulse position is arranged;
Second reconstruction unit 4252 is used for according to the signed distribution that pulse position arranged of each of first reconstruction unit 251 output and each pulse number SU (N) on pulse position being arranged, and rebuilds the pulse train on the track.
The present embodiment decoding device can be used in the coding/decoding method that embodiment seven and eight provides.
For better understanding the foregoing description; Below provide concrete encoding and decoding instance; Coding adopts embodiment three coding methods, and (first coded system adopts embodiment two computing method; Second coded system adopts embodiment four computing method); (first decoding process adopts embodiment six computing method to the corresponding embodiment of employing of decoding seven coding/decoding methods; Second decoding process adopts embodiment eight computing method), suppose that the alternative condition of the first coding/decoding mode is total position number M=16 on
Figure S2007101539527D00282
track.
The example one, pulse search result shown in Figure 8 is carried out encoding and decoding.
A, coding
1.
Figure S2007101539527D00291
confirms to adopt second coded system to encode, and
Figure S2007101539527D00292
needs 21 bits
2. add up N, P (N), SU (N), S (N)
N=1;
P(1)={p(0)}={2};
SU(1)={su(0)}={6};
S(1)={s(0)}={0};
3. I1, I2, I3, I23 encode
According to N=1, can know I1=0x1F0000 by Fig. 7;
According to embodiment four computing method, I2=2;
Class (1)=1, I3=0; So I23=I2=2;
4. generate
Figure S2007101539527D00293
Figure S2007101539527D00294
= 0 x 1 F 0000 + 2 × 2 + 0
= 0 x 1 F 0004
B, decoding
① receive?
Figure S2007101539527D00297
According to the code length determined?
Figure S2007101539527D00298
determine the use of the second decoding means for decoding;
2. extract I1, s (n), I23
Can know by Fig. 7 according to
Figure S2007101539527D00299
; I1=0x1F0000, N=1; According to N=1; Separate 1 bit in end, s (0)=0;
Isolate I23,
Figure S2007101539527D002911
">>k " expression k position that moves to left;
3. I23 decodes
According to N=1, W ( 1 ) = C 16 1 = 16 ;
I3=Int [I23/W (1)]=0, a kind of situation that corresponding SU (1) is unique: SU (1)={ 6};
I2=I23%W (1)=2; According to embodiment eight computing method, P (1)={ p (0) }={ 2};
4. recover pulse train
By P (1)={ 2}, SU (1)={ 6}, s (0)=0 know that " 6 " individual " just " pulse is arranged on position " 2 ".Decode procedure finishes.
The example two, pulse search result shown in Figure 27 is carried out encoding and decoding.
A, coding
1.
Figure S2007101539527D00301
confirms to adopt first coded system to encode, and
Figure S2007101539527D00302
needs 19 bits
2. add up
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};
3. I4 encodes
According to embodiment two computing method, 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 ;
4. generate
Figure S2007101539527D00306
Index ( 5 ) = I 4 × 2 5 + ss ( 0 ) × 2 4 + ss ( 1 ) × 2 4 + . . . + ss ( 4 )
= 4215 × 2 5 + 0
= 0 x 20 EE 0
B, decoding
① receive?
Figure S2007101539527D003010
according to the code length determined?
Figure S2007101539527D003011
determine the use of the first decoding means for decoding;;
2. extract
Separate 5 bits in
Figure S2007101539527D003014
end, ss (0)~ss (4)=0 according to
Figure S2007101539527D003013
;
Isolate I4,
Figure S2007101539527D003015
3. I4 decodes
According to embodiment six computing method, Q (5)=1,1,4,6,6};
4. recover pulse train
By Q (5)={ 1,1,4,6,6}, ss (0)~ss (4)=0 know that " 2 " individual " just " pulse is arranged in the set on the throne, and " 1 " individual " just " pulse is arranged on position " 4 ", and " 2 " individual " just " pulse is arranged on position " 6 ".Decode procedure finishes.
Can find out through the foregoing description; The embodiment of the invention adopts the pulse that needs are encoded to sort and Methods for Coding according to the position distribution in orbit of pulse; Can effectively reduce computation complexity, simultaneously owing to encode the coding that different pulse distribution is corresponding continuous according to ordering; Can reduce the redundance of coding as much as possible, save coded-bit.Further; The comprehensive first and second coding/decoding modes that provide in the embodiment of the invention that adopt; The advantage of two kinds of coded systems under different
Figure S2007101539527D00311
values replenished each other, and effect is obvious further.
More than decoding method provided by the present invention and codec have been carried out detailed introduction; Used concrete example among this paper principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.

Claims (34)

1. a voice coding method is characterized in that, comprising:
To needing the pulse of coding to add up on the track, obtain the position distributed intelligence in orbit of each pulse according to the position;
Confirm distribution index; Said distribution index calculates according to following mode: according to the order of setting; Under current pulse number, the position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging distribution index as the corresponding distribution situation of indication;
Generate code index, said code index comprises the information of said distribution index;
Wherein, Represent that with distribution of pulses vector
Figure FDA0000107228260000011
the position distribution in orbit of each pulse,
Figure FDA0000107228260000012
are the pulse sum that needs coding on the same track; Q (h) h+1 pulse of expression position number in orbit,
Figure FDA0000107228260000014
be
Figure FDA0000107228260000015
perhaps
The computing formula of distribution index I4 is:
Wherein,
Figure FDA0000107228260000017
M is the total number of positions on the track; Q (h) ∈ [0, M]; Number of combinations is asked in " C " expression; ∑ is represented summation.
2. voice coding method according to claim 1 is characterized in that:
Said when the pulse that needs coding on the track is added up according to the position, also, obtain corresponding impulse code information according to the characteristic of the plus or minus of the impulse code of each pulse;
Said code index also comprises the information with each pulse corresponding symbol index, the impulse code information of the pulse that said notation index indication is corresponding with this index.
3. voice coding method according to claim 1 is characterized in that, and is said according to the order of setting, and under current pulse number, the whole in orbit possible distribution situations in the position of each pulse are arranged, and carry out according to following mode:
The position of each pulse on the track distribution corresponds to a -dimensional pulse distribution vector
Figure FDA0000107228260000019
Figure FDA00001072282600000110
Wherein,
Figure FDA00001072282600000111
is the pulse sum that needs coding on the same track; Q (h) h+1 pulse of expression position number in orbit,
Figure FDA00001072282600000112
Figure FDA00001072282600000113
be
Figure FDA00001072282600000114
Figure FDA0000107228260000021
perhaps
The size of each dimension of distribution of pulses vector relatively successively, according to from small to large or order from big to small
Figure FDA0000107228260000022
tie up down whole possible distribution of pulses vectors and sorts.
4. according to any described voice coding method of claim 1~3, it is characterized in that, also comprise:
Need on the same track to confirm the pulse sum of coding;
Pulse sum according to needs coding on the said same track carries out coding mode selection, and said coded system comprises first coded system;
According to the result of said coding mode selection, after confirming to select first coded system, carry out said pulse and add up according to the position to needs coding on the track, obtain the step of the position distributed intelligence in orbit of each pulse.
5. voice coding method according to claim 4; It is characterized in that; The step that said pulse sum according to needs coding on the same track carries out coding mode selection comprises: when the pulse of needs coding on the said same track adds up to 3 or 4 or 5, confirm to select first coded system.
6. voice coding method according to claim 4 is characterized in that said coded system also comprises second coded system, and said coding method also comprises:
According to the result of said coding mode selection, after confirming to select second coded system, carry out said second coded system according to following steps:
Pulse to needing coding on the track is added up according to the position, obtain to have pulse position number, have pulse position distribution and each in orbit that the pulse number on the pulse position is arranged;
Confirm first index according to the number that pulse position is arranged, said first index is corresponding under the identical number that pulse position arranged, and pulse position whole possible distribution situations are in orbit arranged;
According to there being pulse position distribution in orbit to confirm second index, said second index is indicated and the current corresponding distribution situation of distribution that pulse position is arranged from the corresponding whole possible distribution situation of said first index;
There is the pulse number on the pulse position to confirm the 3rd index according to each;
Generate code index, said code index comprises the information of said first, second and third index.
7. voice coding method according to claim 6 is characterized in that:
In second coded system, said when the pulse that needs coding on the track is added up according to the position, also, obtain corresponding impulse code information according to each characteristic of plus or minus that impulse code of pulse position is arranged;
Said code index also comprises the information that pulse position corresponding symbol index is arranged with each, said notation index indication the impulse code information that pulse position arranged corresponding with this index.
8. voice coding method according to claim 6 is characterized in that: in second coded system, said generation code index is, is initial value with first index, the information of other index that superpose; A value of said first index is corresponding to one of code index span independently.
9. voice coding method according to claim 8 is characterized in that: the said number that pulse position arranged and first index are relation one to one;
Have 16 positions on the said track; Needing the pulse number of coding is 6; Have the number of pulse position to be respectively at 1,2,3,4,5,6 o'clock, with its order one to one first index be respectively 1F0000,1E0000,1D0000,180000,000000,100000 with hexadecimal representation; Perhaps,
Have 16 positions on the said track; Needing the pulse number of coding is 5; Have the number of pulse position to be respectively at 1,2,3,4,5 o'clock, with its order one to one first index be respectively 78000,70000,60000,40000,00000 with hexadecimal representation; Perhaps,
Have 16 positions on the said track, needing the pulse number of coding is 4, has the number of pulse position to be respectively at 1,2,3,4 o'clock, with its order one to one first index be respectively E000, C000,8000,0000 with hexadecimal representation; Perhaps,
Have 16 positions on the said track, needing the pulse number of coding is 3, has the number of pulse position to be respectively at 1,2,3 o'clock, with its order one to one first index be respectively 1C00,1800,0000 with hexadecimal representation; Perhaps,
Have 16 positions on the said track, needing the pulse number of coding is 2, has the number of pulse position to be respectively at 1,2 o'clock, with its order one to one first index be respectively 1E0,000 with hexadecimal representation.
10. voice coding method according to claim 8 is characterized in that: be initial value with first index, during the information of other index that superpose, second and third index-group is combined into following form and superposes:
I3×W(N)+I2;
Wherein, I2, I3 are respectively second index and the 3rd index; W (N) is under the corresponding number N that pulse position is arranged of first index, and pulse position whole sum of possible distribution situation is in orbit arranged.
11. voice coding method according to claim 6 is characterized in that, and is said according to there being pulse position distribution in orbit to confirm second index, is the calculating of carrying out second index according to following mode:
According to the order of setting, under the corresponding number that pulse position is arranged of first index, have pulse position in orbit all possible distribution situations arrange, with the sequence number of arranging second index as the corresponding distribution situation of indication.
12. voice coding method according to claim 11; It is characterized in that, said according to the order of setting, under the corresponding number that pulse position is arranged of first index; There are the whole in orbit possible distribution situations of pulse position to arrange, carry out according to following mode:
To there be pulse position distribution in orbit to correspond to a N dimension pulse position vector P (N),
P(N)={p(0),p(1),...,p(N-1)};
Wherein, N is the number that pulse position is arranged; P (n) expression has pulse position position number in orbit, n ∈ [0, N-1]; P (0)<p (1)<...<p (N-1), perhaps p (0)>p (1)>...>p (N-1);
The size of each dimension of pulse position vector relatively successively, according to from small to large or order from big to small to the N dimension down all possible pulse position vectors sort.
13. voice coding method according to claim 12 is characterized in that, the computing formula of second index is:
I 2 = C M N - C M - p ( 0 ) N + Σ n = 1 N - 1 [ C M - p ( n - 1 ) - 1 N - n - C M - p ( n ) N - n ] ;
Wherein, M is the total number of positions on the track; P (0) ∈ [0, M-N], p (n) ∈ [p (n-1)+1, M-N+n]; Number of combinations is asked in " C " expression; ∑ is represented summation.
14. a tone decoding method is characterized in that, comprising:
The received code index;
From said code index, extract distribution index;
Confirm the position distribution in orbit of each pulse according to said distribution index;
The pulse train on the track is rebuild in position distribution in orbit according to each pulse;
Saidly confirm that according to distribution index the position distribution in orbit of each pulse comprises:
Calculate
Figure FDA0000107228260000051
successively wherein according to q (0) order from small to large; Q (0) ∈ [0; M]; M is the total number of positions on the track;
Figure FDA0000107228260000052
pulse sum for encoding on the same track, number of combinations is asked in
Figure FDA0000107228260000053
Figure FDA0000107228260000054
" C " expression; Writing down last makes T [q (0)] greater than the position number v0 of zero q (0) value as the 1st pulse on the track; Wherein I4 is a distribution index;
If
Figure FDA0000107228260000055
then continues to calculate
Figure FDA0000107228260000056
successively wherein according to q (1) order from small to large; Q (1) ∈ [v0, M]; Writing down last makes T1 [q (1)] greater than the position number v1 of zero q (1) value as the 2nd pulse on the track;
By that analogy; Calculate
Figure FDA0000107228260000058
Figure FDA0000107228260000059
successively wherein according to q (h) order from small to large; Q (h) ∈ [v (h-1); M],
Figure FDA00001072282600000510
writes down last makes Th [q (h)] greater than the position number vh of zero q (h) value as h+1 pulse on the track.
15. tone decoding method according to claim 14 is characterized in that, also comprises:
From said code index, extract and each pulse corresponding symbol index the impulse code information of the pulse that said notation index indication is corresponding with this index;
During pulse train on rebuilding track,, recover the characteristic of plus or minus of the impulse code of each pulse also according to said impulse code information.
16. according to any described tone decoding method of claim 14~15, it is characterized in that, also comprise:
Confirm the pulse sum that the code index of said reception is encoded on same track;
Carry out decoding process according to the pulse sum of encoding on the said same track and select, said decoding process comprises first decoding process;
Result according to said decoding process is selected after confirming to select first decoding process, carries out the said step that from code index, extracts distribution index.
17. tone decoding method according to claim 16; It is characterized in that; Saidly carry out the step that decoding process selects according to the pulse sum of encoding on the same track and comprise: when the pulse of encoding on the said same track adds up to 3 or 4 or 5, confirm to select first decoding process.
18. tone decoding method according to claim 17 is characterized in that, said decoding process also comprises second decoding process, and said coding/decoding method also comprises:
Result according to said decoding process is selected, after confirming to select second decoding process, carry out said second decoding process according to following steps:
From said code index, extract first index, define the number of pulse position according to first index;
From said code index, extract second and third index;
Confirm under the corresponding number that pulse position is arranged of said first index, pulse position distribution is in orbit arranged according to second index;
Confirm that according to the 3rd index each has the pulse number on the pulse position;
According to having pulse position distribution in orbit and each that pulse number on pulse position is arranged, rebuild the pulse train on the track.
19. tone decoding method according to claim 18; It is characterized in that: after defining the number of pulse position; Also from said code index, extracting with each has pulse position corresponding symbol index, said notation index indication the impulse code information that pulse position arranged corresponding with this index;
During pulse train on rebuilding track,, recover the characteristic of the plus or minus of each impulse code that pulse position is arranged also according to said impulse code information.
20. tone decoding method according to claim 18; It is characterized in that; Said first index that from code index, extracts adopts: from set several independently the span; Judge the span that said code index is affiliated, confirm said first index according to the initial value that the span under this is corresponding.
21. tone decoding method according to claim 20; It is characterized in that; Said second and third index that from code index, extracts adopts: from code index, extract the combined value I23 of second and third index, isolate second and third index according to following mode
I2=I23%W(N),I3=Int[I23/W(N)];
Wherein, I2, I3 are respectively second index and the 3rd index; W (N) is under the corresponding number N that pulse position is arranged of first index, and pulse position whole sum of possible distribution situation is in orbit arranged; % representes to get remainder; Int representes to round.
22. tone decoding method according to claim 18 is characterized in that, saidly defines pulse position distribution in orbit according to second index and adopts:
From the second index I2, deduct
Figure FDA0000107228260000071
one by one and become negative by positive number up to the residual value R of I2 (y0); Wherein, M is the total number of positions on the track, and N is the number that pulse position is arranged, y0 ∈ [1, M-N+1], and number of combinations is asked in " C " expression; The 1st position number p (0)=y0-1 that pulse position is arranged on the track record;
If N>1 is then continued from R [p (0)], to deduct
Figure FDA0000107228260000072
one by one and is become negative up to the residual value R1 (y1) of R [p (0)] by positive number; The 2nd position number p (1)=y1-1 that pulse position is arranged on the track record;
By that analogy, from R (n-1) [p (n-1)], deduct
Figure FDA0000107228260000073
Figure FDA0000107228260000074
one by one and become negative by positive number up to the residual value Rn (yn) of R (n-1) [p (n-1)]; Wherein, n≤N-1; N+1 position number p (n)=yn-1 that pulse position is arranged on the track record.
23. a speech coder is characterized in that, comprising:
First statistic unit is used for the pulse of needs coding on the track is added up according to the position, obtains the position distributed intelligence in orbit of each pulse;
The distribution index unit; Be used for confirming distribution index; Said distribution index calculates according to following mode: according to the order of setting; Under current pulse number, the position of each pulse in orbit all possible distribution situations arrange, with the sequence number of arranging distribution index as the corresponding distribution situation of indication;
Wherein, Represent that with distribution of pulses vector
Figure FDA0000107228260000075
the position distribution in orbit of each pulse,
Figure FDA0000107228260000076
are the pulse sum that needs coding on the same track; Q (h) h+1 pulse of expression position number in orbit,
Figure FDA0000107228260000077
Figure FDA0000107228260000078
be
Figure FDA0000107228260000079
perhaps
The computing formula of distribution index I4 is:
Figure FDA00001072282600000710
Wherein,
Figure FDA00001072282600000711
M is the total number of positions on the track; Q (h) ∈ [0, M]; Number of combinations is asked in " C " expression; ∑ is represented summation;
The index generation unit is used to generate code index, and said code index comprises the information of said distribution index.
24. speech coder according to claim 23; It is characterized in that: said first statistic unit is also according to the characteristic of the plus or minus of the impulse code of each pulse; The information of output and each pulse corresponding symbol index, the impulse code information of the pulse that said notation index indication is corresponding with this index; Said index generation unit also will with the information of each pulse corresponding symbol index, be combined in the said code index.
25. according to claim 23 or 24 described speech coders, it is characterized in that, also comprise:
The coding selected cell is used for confirming that the pulse of needs coding on the same track is total; Pulse sum according to needs coding on the said same track carries out coding mode selection, and said coded system comprises first coded system; According to the result of said coding mode selection, after confirming to select first coded system, trigger said first statistic unit and begin to carry out coding.
26. speech coder according to claim 25 is characterized in that, also comprises:
Second statistic unit is used for the pulse of needs coding on the track is added up according to the position, output have pulse position number, have pulse position distribution and each in orbit that the pulse number on the pulse position is arranged;
Index calculating; Said index calculating comprises: first indexing units; Be used for exporting first index according to the number that pulse position is arranged, said first index is corresponding under the identical number that pulse position arranged, and pulse position whole possible distribution situations are in orbit arranged; Second indexing units is used for according to there being pulse position distribution in orbit to export second index, and said second index is indicated and the current corresponding distribution situation of distribution that pulse position is arranged from the corresponding whole possible distribution situation of said first index; The 3rd indexing units is used for having the pulse number on the pulse position to export the 3rd index according to each;
The index assembled unit, the information that is used to make up said first, second and third index generates code index;
The selectable coded system of said coding selected cell also comprises second coded system, and said coding selected cell, triggers said second statistic unit and begins to carry out coding after confirming to select second coded system according to the result of said coding mode selection.
27. speech coder according to claim 26 is characterized in that: said second statistic unit also according to each characteristic of plus or minus that impulse code of pulse position is arranged, is exported corresponding impulse code information; Said index assembled unit also will with each information that pulse position corresponding symbol index is arranged, be combined in the said code index impulse code information that pulse position is arranged that the indication of said notation index is corresponding with this index.
28. speech coder according to claim 26 is characterized in that, said index combination unit pack is drawn together:
First assembled unit is used to export second and third index that is combined as following form,
I3×W(N)+I2;
Wherein, I2, I3 are respectively second index and the 3rd index; W (N) is under the corresponding number N that pulse position is arranged of first index, and pulse position whole sum of possible distribution situation is in orbit arranged;
Second assembled unit is used for the output of said first assembled unit and the information stack of other index, output encoder index.
29. a Voice decoder is characterized in that, comprising:
Input block is used for the received code index;
The distribution extraction unit is used for extracting distribution index from said code index;
The distribution solution code element is used for confirming according to said distribution index the position distribution in orbit of each pulse; Saidly confirm that according to distribution index the position distribution in orbit of each pulse comprises:
Calculate
Figure FDA0000107228260000091
successively wherein according to q (0) order from small to large; Q (0) ∈ [0; M]; M is the total number of positions on the track;
Figure FDA0000107228260000092
pulse sum for encoding on the same track, number of combinations is asked in
Figure FDA0000107228260000093
Figure FDA0000107228260000094
" C " expression; Writing down last makes T [q (0)] greater than the position number v0 of zero q (0) value as the 1st pulse on the track; Wherein I4 is a distribution index;
If
Figure FDA0000107228260000095
then continues to calculate
Figure FDA0000107228260000096
Figure FDA0000107228260000097
successively wherein according to q (1) order from small to large; Q (1) ∈ [v0, M]; Writing down last makes T1 [q (1)] greater than the position number v1 of zero q (1) value as the 2nd pulse on the track;
By that analogy; Calculate
Figure FDA0000107228260000099
successively wherein according to q (h) order from small to large; Q (h) ∈ [v (h-1); M],
Figure FDA00001072282600000910
writes down last makes Th [q (h)] greater than the position number vh of zero q (h) value as h+1 pulse on the track;
The distribution reconstruction unit is used for rebuilding the pulse train on the track according to the position distribution in orbit of each pulse.
30. Voice decoder according to claim 29 is characterized in that, also comprises:
The symbol extraction unit is used for from said code index, extracting and each pulse corresponding symbol index the impulse code information of the pulse that said notation index indication is corresponding with this index according to the pulse sum of encoding on the same track;
Said distribution reconstruction unit is also according to said impulse code information, recovers the characteristic of plus or minus of the impulse code of each pulse.
31. according to claim 29 or 30 described Voice decoders, it is characterized in that, also comprise:
The decoding selected cell is used for confirming the pulse sum that the code index of said reception is encoded on same track; Carry out decoding process according to the pulse sum of encoding on the said same track and select, said decoding process comprises first decoding process; Result according to said decoding process is selected after confirming to select first decoding process, triggers said distribution extraction unit and begins to carry out decoding.
32. Voice decoder according to claim 31 is characterized in that, also comprises:
First extraction unit is used for the received code index, from said code index, extracts first index, defines the number of pulse position according to first index;
Second extraction unit is used for extracting second and third index from said code index;
First decoding unit is used for confirming according to second index, under the corresponding number that pulse position is arranged of said first index, pulse position distribution is in orbit arranged;
Second decoding unit is used for confirming that according to the 3rd index each has the pulse number on the pulse position;
The pulse reconstruction unit is used for rebuilding the pulse train on the track according to having pulse position distribution in orbit and each that pulse number on pulse position is arranged;
The selectable decoding process of said decoding selected cell also comprises second decoding process, and the result that said decoding selected cell is selected according to said decoding process after confirming to select second decoding process, triggers said first extraction unit and begins to carry out decoding.
33. Voice decoder according to claim 32; It is characterized in that; Also comprise: the 3rd extraction unit; Be used for according to the number that pulse position is arranged, from said code index, extracting with each has pulse position corresponding symbol index, said notation index indication the impulse code information that pulse position arranged corresponding with this index;
Said pulse reconstruction unit comprises: first reconstruction unit, be used for according to have pulse position in orbit distribution and with each pulse position corresponding symbol index is arranged, recover the characteristic of the plus or minus of each impulse code that pulse position is arranged; Second reconstruction unit is used for each pulse number on pulse position being arranged according to each signed distribution that pulse position arranged, and rebuilds the pulse train on the track.
34. Voice decoder according to claim 32 is characterized in that, said second extraction unit comprises: the segregant unit is used for extracting from code index the combined value I23 of second and third index;
Resolve subelement, be used for separating second and third index of output according to following mode,
I2=I23%W(N),I3=Int[I23/W(N)];
Wherein, I2, I3 are respectively second index and the 3rd index; W (N) is under the corresponding number N that pulse position is arranged of first index, and pulse position whole sum of possible distribution situation is in orbit arranged; % representes to get remainder; Int representes to round.
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
DK14184929.9T DK2827327T3 (en) 2007-04-29 2008-04-29 Method for excitation pulse coding
EP08734199.6A EP2157573B1 (en) 2007-04-29 2008-04-29 An encoding and decoding method
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
ES14184929T ES2817906T3 (en) 2007-04-29 2008-04-29 Pulse coding method of excitation signals
EP14184929.9A EP2827327B1 (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
ES08734199.6T ES2529292T3 (en) 2007-04-29 2008-04-29 Encoding and decoding method
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
JP5221642B2 (en) 2007-04-29 2013-06-26 華為技術有限公司 Encoding method, decoding method, encoder, and decoder
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 coding and decoding 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
AR085221A1 (en) 2011-02-14 2013-09-18 Fraunhofer Ges Forschung APPARATUS AND METHOD FOR CODING AND DECODING AN AUDIO SIGNAL USING AN ADVANCED DRESSED PORTION
SG192748A1 (en) 2011-02-14 2013-09-30 Fraunhofer Ges Forschung 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.
CN103534754B (en) 2011-02-14 2015-09-30 弗兰霍菲尔运输应用研究公司 The audio codec utilizing noise to synthesize during the inertia stage
TR201903388T4 (en) * 2011-02-14 2019-04-22 Fraunhofer Ges Forschung Encoding and decoding the pulse locations of parts of an audio signal.
AR085218A1 (en) 2011-02-14 2013-09-18 Fraunhofer Ges Forschung APPARATUS AND METHOD FOR HIDDEN ERROR UNIFIED VOICE WITH LOW DELAY AND AUDIO CODING
PL2550653T3 (en) 2011-02-14 2014-09-30 Fraunhofer Ges Forschung Information signal representation using lapped transform
CA2827266C (en) 2011-02-14 2017-02-28 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Apparatus and method for coding a portion of an audio signal using a transient detection and a quality result
CN117831546A (en) * 2022-09-29 2024-04-05 抖音视界有限公司 Encoding method, 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
CN102122966B (en) Channel-polarization-based encoder for staggered structure duplication code, and encoding and decoding methods thereof
Krichevsky Universal compression and retrieval
CN102164025B (en) Coder based on repeated coding and channel polarization and coding/decoding method thereof
CN101483043A (en) Code book index encoding method based on classification, permutation and combination
CN101815992B (en) Encoding and/or decoding digital content
CN103995887A (en) Bitmap index compressing method and bitmap index decompressing method
KR102269463B1 (en) How to code and decode information
CN101604977B (en) Encoders and methods for encoding digital data with low-density parity check matrix
EP2157573B1 (en) An encoding and decoding method
CN102394661A (en) LDPC (low density parity check) decoder and decoding method based on layer decoding processing
CN102377437B (en) Method and device for coding quasi-cyclic low density parity check codes
CN101981618A (en) Reduced-complexity vector indexing and de-indexing
Weinberger et al. The DNA storage channel: Capacity and error probability bounds
CN110569974B (en) DNA storage layered representation and interweaving coding method capable of containing artificial base
CN114496105A (en) Single-step inverse synthesis method and system based on multi-semantic network
CN101431335B (en) Modulation coding and decoding method, device and system
CN102299760A (en) pulse coding and decoding method and pulse codec
CN111276187A (en) Gene expression profile feature learning method based on self-encoder
CN102623012B (en) Vector joint coding and decoding method, and codec
CN101110593A (en) QC-LDPC encoder horizontal arithmetic unit fast assembly line cascade connection structure
CN101931414B (en) Pulse coding method and device, and pulse decoding method and device
EP1790083A4 (en) Code design and implementation improvements for low density parity check codes for multiple-input multiple-output channels
Frey et al. Efficient stochastic source coding and an application to a Bayesian network source model

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