Embodiment
For above-mentioned purpose of the present invention, feature and advantage can more be become apparent, below in conjunction with accompanying drawing the specific embodiment of the present invention is described in detail.
Set forth detail in the following description so that fully understand the present invention.But the present invention can be different from alternate manner described here and implements with multiple, and those skilled in the art can do similar popularization in the situation of intension of the present invention.Therefore the present invention is not subjected to the restriction of following public embodiment.
The search of algebraically code table is take the important step of Code Excited Linear Prediction as the voice coding on basis.Take the 3GPPAMR speech coding standard as example.
3GPP AMR speech coding standard (comprising AMR-NB speech coding standard and AMR-WB speech coding standard) uses the method for algebraically code table search, the square mean error amount between the input speech signal of minimizing weighting and the code table synthetic speech signal of weighting.Because overall traversal search has great computational complexity, difficult realization, therefore, 3GPP AMR speech coding standard has defined the Depth Priority Searching take two tracks as step-length.
3GPP AMR speech coding standard (comprising AMR-NB speech coding standard and AMR-WB speech coding standard) uses the method for algebraically code table search, the square mean error amount between the input speech signal of minimizing weighting and the code table synthetic speech signal of weighting.
In a subframe (subframe) coding, suppose that c is the algebraic code sequence, d is the correlation function of echo signal x and weighted comprehensive filtrator impulse response h (n), and Φ is the incidence matrix of h (n), and the search of algebraically code table needs the maximization following formula:
Wherein, d and Φ had calculated acquisition before the search of algebraically code table.3GPPAMR speech coding standard (comprising MR-NB speech coding standard and AMR-WB speech coding standard) is divided into a plurality of tracks (track) with a subframe (subframe), and each track has impulse corresponding to the algebraic code of fixed number (pulse).For example, under the 12.2kbps pattern in the AMR-NB speech coding standard, each subframe contains 40 input signals 0~39, is divided into 5 tracks, has 10 impulse i0~i9 that algebraic code is corresponding, and the optional signal location of algebraic code is as shown in table 1 below.
Table 1
Track |
The impulse number |
Optional signal location |
1 |
2 |
0,5,10,15,20,25,30,35 |
2 |
2 |
1,6,11,16,21,26,31,36 |
3 |
2 |
2,7,12,17,22,27,32,37 |
4 |
2 |
3,8,13,18,23,28,33,38 |
5 |
2 |
4,9,14,19,24,29,34,39 |
The all possible impulse combination of traversal search has great computational complexity.
The 3GPPAMR speech coding standard has defined the Depth Priority Searching take two tracks as step-length.In the search in each step, under the prerequisite of the impulse that each step has been searched out before inheriting, the track at two impulse places that this step is investigated carries out traversal search.The impulse position that each step has been searched out before needing to depend in the search in each step.
The Depth Priority Searching that it is step-length that algebraically code table search in the 3GPP AMR speech coding standard (comprising AMR-NB speech coding standard and AMR-WB speech coding standard) is based on two tracks.This method has been fixed the computational complexity of search, can not adaptive realization coding quality and the computational complexity of algebraically code table between balance.In view of the above problems, the inventor has proposed technical scheme of the present invention.
Fig. 1 is the process flow diagram of algebraically code table searching method in the voice coding that provides of the embodiment of the invention, describes in detail below in conjunction with Fig. 1.
The searching method of algebraically code table comprises in the described voice coding:
Step S1 based on coding mode, obtains the computational complexity of various alternative algebraically code table search strategies;
Step S2 based on the computational complexity of the performance parameter of system and described alternative algebraically code table search strategy, determines object algebra code table search strategy, and described object algebra code table search strategy comprises the number of the track for the treatment of traversal search;
Step S3 based on determined object algebra code table search strategy, searches for the optional signal location of algebraic code corresponding to described coding mode, obtains the algebraically code table of corresponding described coding mode.
Among the described step S1, different speech coding standards has different coding modes, and the same speech coding standard also can have the Multi-encoding pattern.Under a kind of coding mode, the optional signal location of corresponding one or more different algebraic codes.Under the different coding modes, the computational complexity of the optional signal location of algebraic code and alternative algebraically code table search strategy also is not quite similar.The optional signal location of algebraic code and alternative algebraically code table search strategy are determined based on speech coding standard and coding mode thereof, described alternative algebraically code table search strategy is corresponding one by one with the number of the track of traversal search, and the number of the track of described traversal search can be more than or equal to 1.
Concrete, after speech coding standard and coding mode thereof were determined, the optional signal location of the algebraic code that this coding mode is corresponding was also substantially definite.All under the fixed condition, the computational complexity of algebraically code table search strategy is determined by the number of the track for the treatment of traversal search at the optional signal location of algebraic code corresponding to speech coding standard, coding mode and coding mode.The number of track for the treatment of traversal search is more, and the computational complexity of algebraically code table search strategy is higher.
Among the described step S2, described search (namely searching for the optional signal location of algebraic code corresponding to described coding mode) can comprise multi-step searching, the track of traversal search fixed number in per step search; Adopt the method for depth-first to determine the algebraically code table between each step search; Described object algebra code table search strategy also comprises the step number of search, and the described number of the track of traversal search for the treatment of comprises the fixed number for the treatment of the track of traversal search in each step search.The fixed number of described track is more than or equal to 1, and optional, the fixed number of described track is 1~3.
When searching for the optional signal location of algebraic code corresponding to described coding mode and comprising multi-step searching, the computational complexity of described algebraically code table search strategy represents the computational complexity of the track of traversal search fixed number in per step, and the computational complexity of the track of described traversal search fixed number is determined by described fixed number.
In same step search, the number of the track of traversal search is (being the track of traversal search fixed number in per step search) of fixing, but for asynchronous search, the number of the track of traversal search can be identical, also can be different.For example, described object algebra code table search strategy determines that the step number of the optional signal location of algebraic code that the described coding mode of search is corresponding was two steps, the number of the track of traversal search can be two in the first step search, and the number of the track of traversal search can be three in the second step search.
When searching for the optional signal location of algebraic code corresponding to described coding mode and comprising multi-step searching, among the described step S1, the computational complexity that obtains various alternative algebraically code table search strategies comprises: based on the optional signal location of algebraic code corresponding to described coding mode, determine the computational complexity of the algebraically code table search strategy corresponding with the number of the track of traversal search.For example, be the computational complexity (computational complexity of 1 track of traversal search) of 1 corresponding algebraically code table search strategy with the number of the track of traversal search, being the computational complexity (computational complexities of 2 tracks of traversal search) of 2 corresponding algebraically code table search strategies with the number of the track of traversal search, is the computational complexity (computational complexities of 3 tracks of traversal search) of 3 corresponding algebraically code table search strategies with the number of the track of traversal search.
Search for the optional signal location of algebraic code corresponding to described coding mode and also can be single step, the computational complexity of described algebraically code table search strategy represents the computational complexity of the track of traversal search fixed number in this step.
The 12.2kbps pattern of the below in the 3GPP ARM speech coding standard describes as example.For the 12.2kbps pattern in the 3GPP ARM speech coding standard, each subframe contains 40 input signals 0~39, is divided into 5 tracks, has 10 impulse i0~i9 that algebraic code is corresponding, and optional signal location is shown in aforementioned table 1.Table 1 is under the 12.2kbps pattern in the 3GPP ARM speech coding standard, the optional signal location of algebraic code.
3GPP AMR speech coding standard has defined the Depth Priority Searching take two tracks as step-length.In conjunction with aforementioned table 1,12.2kbps pattern regulation i0 is corresponding to the impulse with Global maximum absolute amplitude value in the AMR-NB speech coding standard, and carry out cyclic search four times: in each search, i1 is each defined in four of being different from the track of i0 place, and is the impulse with the maximum absolute amplitude value of this track.Two of all the other impulses are one group and carry out traversal search according to the step, and two track number of searching in per step guarantee that according to 1~5 circumference cyclic order each track contains two impulses among each cyclic search result.Two track number of searching in per step are as shown in table 2.At last, that obtains maximum A value among four cyclic search results elected the final plan of algebraically code table search as.In each step traversal search, the selectable location number of any one impulse is 8, optional impulse number of combinations so altogether, and namely the computational complexity of the algebraically code table search strategy of two tracks of search of per step is: 4 * 4 * (8 * 8)=1024.
Table 2
Track |
The impulse number |
Optional signal location |
1 |
i0,15 |
0,5,10,15,20,25,30,35 |
2 |
i1,i6 |
1,6,11,16,21,26,31,36 |
3 |
i2,i7 |
2,7,12,17,22,27,32,37 |
4 |
i3,i8 |
3,8,13,18,23,28,33,38 |
5 |
i4,i9 |
4,9,14,19,24,29,34,39 |
In like manner, in the Depth Priority Searching of step-length, carry out cyclic search take a track four times, track of per step search.At last, obtain peaked that among four cyclic search results and elect the final plan of algebraically code table search as.In each step traversal search, the selectable location number of any one impulse is 8, optional impulse number of combinations so altogether, and namely the computational complexity of the algebraically code table search strategy of a track of search of per step is: 4 * (8 * 8)=256.
In like manner, in the Depth Priority Searching of step-length, carry out cyclic search take three tracks four times, three tracks of per step search.At last, obtain peaked that among four cyclic search results and elect the final plan of algebraically code table search as.In each step traversal search, the selectable location number of any one impulse is 8, optional impulse number of combinations so altogether, namely the computational complexity of the algebraically code table search strategy of three tracks of search of per step is: 4 * (8 * 8 * 8+8 * 8 * 8+8 * 8)=4352.
The computational complexity of the above-mentioned searching method corresponding with the track number of traversal search in each per step further is scaled the frequency parameter with used processor coupling.Different processors is not identical for the processing time (frequency) that same computing needs.Computational complexity further is scaled the frequency parameter that mates with used processor, can makes in the following method:
Method one: determine this processor fundamental operation, such as addition, multiplication, the processing time of storage etc.; Determine searching method in the fundamental operation that relates to and the basic information such as number of calculating, as carry out addition, multiplication, the number of the computings such as storage, number of times etc.; Count the processing time of the fundamental operation that relates in the searching method, then further the computational complexity in the searching method is scaled the frequency parameter with used processor coupling.
By way of example, determine in the searching method, the track number of per step traversal search is that 1 o'clock computational complexity is 256, required fundamental operation is multiplication, number of times is n time, the processing time that processor is processed multiplying is 0.03s, and the track number of adding up per step traversal search is that 1 o'clock required processing time was 0.03s * n; Then further the computational complexity in the searching method is scaled the frequency parameter with used processor coupling: 256 ÷ (0.03s * n), also can be called " corresponding to the processing frequency of the computational complexity of the algebraically code table search strategy of 1 track of traversal search ".Similarly, " corresponding to the processing frequency of the computational complexity of the algebraically code table search strategy of 2 tracks of traversal search " and " corresponding to the processing frequency of the computational complexity of the algebraically code table search strategy of 3 tracks of traversal search " can convert and obtain.
Method two: experiment detects and obtains: the processing time that counts the fundamental operation that relates in the searching method; Then further the computational complexity in the searching method is scaled the frequency parameter with used processor coupling.
Among the described step S2, the performance parameter of system comprises: the available dominant frequency that is used for the processor of voice coding.Described available dominant frequency represents that current processor is remaining, can be for the dominant frequency of the optional signal location consumption of algebraic code corresponding to the described coding mode of search.If described system comprises a plurality of processors, be respectively applied to search, coding etc., then the performance parameter of described system comprises at least: the available dominant frequency that is used for the processor of search.
When the performance parameter of described system is the available dominant frequency of processor, if the fixed number of the track for the treatment of traversal search of per step search is identical, described based on system performance parameter and the computational complexity of described alternative algebraically code table search strategy, determine that object algebra code table search strategy comprises:
When the available dominant frequency of described processor more than or equal to the processing frequency corresponding to the computational complexity of the first alternative algebraically code table search strategy, and less than the processing frequency corresponding to the computational complexity of the second alternative algebraically code table search strategy, determine then to treat in per step search that the fixed number of the track of traversal search is the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy;
Wherein, the described first alternative algebraically code table search strategy and the second alternative algebraically code table search strategy are the algebraically code table search strategy corresponding with the number of the track of traversal search, and the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy less than with the number of the track of traversal search corresponding to the described second alternative algebraically code table search strategy.
Specifically, if the available dominant frequency of described processor is more than or equal to corresponding to being the processing frequency of the computational complexity of 1 corresponding algebraically code table search strategy (the first alternative algebraically code table search strategy) with the number of the track of traversal search, and less than corresponding to being the processing frequency of the computational complexity of 2 corresponding algebraically code table search strategies (the second alternative algebraically code table search strategy) with the number of the track of traversal search, determine then in the described object algebra code table search strategy that per step treats that the fixed number of the track of traversal search is 1;
If the available dominant frequency of described processor is more than or equal to corresponding to being the processing frequency of the computational complexity of 2 corresponding algebraically code table search strategies (the first alternative algebraically code table search strategy) with the number of the track of traversal search, and less than corresponding to being the processing frequency of the computational complexity of 3 corresponding algebraically code table search strategies (the second alternative algebraically code table search strategy) with the number of the track of traversal search, determine then in the described object algebra code table search strategy that per step treats that the fixed number of the track of traversal search is 2;
If the available dominant frequency of described processor is more than or equal to corresponding to being the processing frequency of the computational complexity of 3 corresponding algebraically code table search strategies (the first alternative algebraically code table search strategy) with the number of the track of traversal search, and less than corresponding to being the processing frequency of the computational complexity of 4 corresponding algebraically code table search strategies (the second alternative algebraically code table search strategy) with the number of the track of traversal search, determine then in the described object algebra code table search strategy that per step treats that the fixed number of the track of traversal search is 3.In the specific implementation process, determine that per step in the described object algebra code table search strategy can by that analogy, repeat no more when treating the fixed number of track of traversal search herein.
When the performance parameter of described system is the available dominant frequency of processor, if the fixed number of the track for the treatment of traversal search of asynchronous search is different, described based on system performance parameter and the computational complexity of described alternative algebraically code table search strategy, determine that object algebra code table search strategy comprises:
Before per step search, when the available dominant frequency of described processor more than or equal to the processing frequency corresponding to the computational complexity of the first alternative algebraically code table search strategy, and less than the processing frequency corresponding to the computational complexity of the second alternative algebraically code table search strategy, the fixed number of then determining to treat in this step search the track of traversal search is the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy;
Wherein, the described first alternative algebraically code table search strategy and the second alternative algebraically code table search strategy are the algebraically code table search strategy corresponding with the number of the track of traversal search, and the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy less than with the number of the track of traversal search corresponding to the described second alternative algebraically code table search strategy.
Among the described step S3, based on determined object algebra code table search strategy, search for the optional signal location of algebraic code corresponding to described coding mode, obtain the algebraically code table of corresponding described coding mode.Algebraically code table based on the corresponding described coding mode that obtains can carry out follow-up coding work.
Based on the searching method of algebraically code table in the described voice coding, embodiments of the invention also provide a kind of voice coding method, utilize the searching method search of algebraically code table in the described voice coding to obtain the algebraically code table, carry out voice coding based on described algebraically code table.
Fig. 2 is the structural drawing of the searcher of algebraically code table in the voice coding that provides of the embodiment of the invention, describes in detail below in conjunction with Fig. 1.
The searcher of algebraically code table comprises in the described voice coding:
Acquiring unit 1 in order to based on coding mode, obtains the computational complexity of various alternative algebraically code table search strategies;
Determining unit 2 in order to the computational complexity based on the performance parameter of system and described alternative algebraically code table search strategy, is determined object algebra code table search strategy, and described object algebra code table search strategy comprises the number of the track for the treatment of traversal search; Determining unit 2 links to each other with acquiring unit 1, and determining unit 2 is obtained the computational complexity of alternative algebraically code table search strategy from acquiring unit 1;
Search unit 3 in order to based on determined object algebra code table search strategy, is searched for the optional signal location of algebraic code corresponding to described coding mode, obtains the algebraically code table of corresponding described coding mode; Search plain unit 3 and link to each other with determining unit 2, search plain unit 3 and obtain object algebra code table search strategy from determining unit 2.
The described search that described search unit 3 is carried out comprises multi-step searching, the track of traversal search fixed number in per step search; Adopt the method for depth-first to determine the algebraically code table between each step search; Described object algebra code table search strategy also comprises the step number of search, and the described number of the track of traversal search for the treatment of comprises the fixed number for the treatment of the track of traversal search in each step search.The fixed number of track is more than or equal to 1.
Described acquiring unit 1 is in order to based on the optional signal location of algebraic code corresponding to described coding mode, determines the computational complexity of the algebraically code table search strategy corresponding with the number of the track of traversal search.
The performance parameter of described system comprises: the available dominant frequency that is used for the processor of voice coding.
In one embodiment, described determining unit in order to when the available dominant frequency of described processor more than or equal to the processing frequency corresponding to the computational complexity of the first alternative algebraically code table search strategy, and less than the processing frequency corresponding to the computational complexity of the second alternative algebraically code table search strategy, determine then to treat in per step search that the fixed number of the track of traversal search is the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy;
Wherein, the described first alternative algebraically code table search strategy and the second alternative algebraically code table search strategy are the algebraically code table search strategy corresponding with the number of the track of traversal search, and the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy less than with the number of the track of traversal search corresponding to the described second alternative algebraically code table search strategy.
In another embodiment, described determining unit is in order to before per step search, when the available dominant frequency of described processor more than or equal to the processing frequency corresponding to the computational complexity of the first alternative algebraically code table search strategy, and less than the processing frequency corresponding to the computational complexity of the second alternative algebraically code table search strategy, the fixed number of then determining to treat in this step search the track of traversal search is the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy;
Wherein, the described first alternative algebraically code table search strategy and the second alternative algebraically code table search strategy are the algebraically code table search strategy corresponding with the number of the track of traversal search, and the number of the track of the traversal search corresponding with the described first alternative algebraically code table search strategy less than with the number of the track of traversal search corresponding to the described second alternative algebraically code table search strategy.
The searcher of algebraically code table can be integrated in speech coding system in the described voice coding, and the searcher of algebraically code table obtains the algebraically code table for search in the described voice coding; Described speech coding system can also comprise code device, in order to carry out voice coding based on described algebraically code table.
Technical scheme of the present invention has following advantage at least:
The performance parameter of coupling system is adjusted the computational complexity of algebraically code table search.This can rationally utilize the resource of system, the wasting of resources or the anxiety of anti-locking system, and the algebraically code table after the adjustment can guarantee at the preferably coding quality that satisfies under the system resource constraints.Realized like this computational complexity of algebraically code table search, the balance of coding quality and system performance Relations Among.
Although the present invention with preferred embodiment openly as above; but it is not to limit the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can utilize method and the technology contents of above-mentioned announcement that technical solution of the present invention is made possible change and modification; therefore; every content that does not break away from technical solution of the present invention; to any simple modification, equivalent variations and modification that above embodiment does, all belong to the protection domain of technical solution of the present invention according to technical spirit of the present invention.