Embodiment
Specify below in conjunction with the sampling rate converting method of accompanying drawing a kind of digital signal of embodiment of the present invention.
See also shown in Figure 1ly, Fig. 1 is the flow chart of sampling rate converting method of a kind of digital signal of embodiment of the present invention, comprises following steps:
Step S101, the cascade transformational analysis;
Input sampling rate f
1With output sampling rate f
2Between have integer ratios M: N and make f
2=f
1N/M, wherein M, N do not have further abbreviation of common factor.According to input sampling rate f
1With output sampling rate f
2Between integer ratios M: the different situations of N are decomposed into following three kinds of situation with sample rate conversion:
(a) only carry out the situation of integer conversion: if the factor that M, N can effectively arrange is decomposed and made M
1* M
2* L * M
K=M, N
1* N
2* L * N
K=N, and satisfy
I=1,2, L, K (formula 1)
K>=1,1≤M wherein
1, M
2, L, M
K, N
1, N
2, L, N
K<P
Max, carry out the cascade integer so and change signal sampling rate by f
1Convert f into
2
(b) only carry out the situation of small conversion: if M, N can not carry out the factor described in (a) and decompose, but min (M, N)/| M-N|>P
Max, carry out so small conversion with signal sampling rate by f
1Convert f into
2, the small transfer ratio f of this moment
1: f
2=M: N=s
1: s
2, s wherein
1, s
2There is not further abbreviation of common factor.
(c) integer conversion and the small conversion situation of all carrying out: if M, N can not carry out the factor decomposition described in (a), but min (M, N)/| M-N|≤P
Max, look for M
1* M
2* L * M
K=M ', N
1* N
2* L * N
K=N ' makes | N '/M '-N/M| is minimum, and satisfies (formula 1), 1≤M wherein
1, M
2, L, M
K, N
1, N
2, L, N
K<P
Max, K>=1 is carried out the cascade integer so and is changed signal sampling rate by f
1Convert f ' into
2, carry out small conversion again with f '
2Convert f into
2, the small transfer ratio f ' of this moment
2: f
2=MN ': NM '=s
1: s
2, s wherein
1, s
2There is not further abbreviation of common factor.Wherein above-mentioned (a), (b), the P in (c)
MaxInterval be [20,30], be generally 20.
If the result of step S101 cascade transformational analysis is for only carrying out the situation of integer conversion, execution in step S102 so, at first carry out cascade integer conversion configurations:
Consider the k level of integer conversion, the frequency inverted ratio of integers of this one-level is M
k: N
kThe elementary cell of integer conversion is a N
k* M
kl
kInteger transition matrix A
k, input signal is placed on M
kI
kIn the some buffering.It is periodic that the output of integer conversion is calculated, order
Be buffer input signal,, use A in the j time output of one-period
kThe capable x of multiply by of j obtain 1 output signal, upgrade int [jM then
k/ N
k]-int [(j-1) M
k/ N
k] individual input, if int [jM
k/ N
k]-int [(j-1) M
k/ N
k] be 0, then do not upgrade, accomplish N
kIndividual output back j returns the new cycle of 1 beginning.
The integer transition matrix is that the extraction through low pass filter makes up, and the low pass filter vector is h
k=[h
k(0), h
k(1), h
k(2), h
k(3), h
k(4), h
k(5), L, h
k(M
kl
kN
k-1)], its length is M
kl
kN
k, its stopband attenuation is controlled at about 80 to 100dB, wherein l
kThe length that is used for control filters, generally about 30, cut-off frequency is 1/max (M for it
k, N
k), but, need stay certain redundancy in order to reduce the influence of transition band aliasing, can cut-off frequency be compressed to originally about 0.95 downwards, promptly cut-off frequency is 0.95/max (M
k, N
k).
Be illustrated in figure 2 as the through transport of integer switching stage and make the mode sketch map, the integer transition matrix A of each grade
kBy low pass filter vector h
kExtract and obtain
(formula 2)
Be illustrated in figure 3 as one through the design of 256 Chebyshev window; Frequency response chart with 1/10 low pass filter instance of 90dB stopband attenuation; Wherein fine rule is the prototype filter frequency response that Floating-point Computation obtains, and thick line is the filter freguency response after precision reduces (15 precision).
If the result of step S101 cascade transformational analysis is for only carrying out the situation of small conversion, execution in step S103 so, at first carry out small conversion configurations:
The higher order polynomial interpolation is adopted in small conversion, and the condition that satisfies according to higher order polynomial is different, can be divided into quick small conversion and two kinds of situation of best small conversion, describes respectively below:
(a) quick small conversion
The higher order polynomial function can obtain more level and smooth curve, and n rank polynomial function does
F (x)=a
nx
n+ a
N-1x
N-1+ L+a
1X+a
0(formula 3)
Known f (t
j)=x
j, j=0,1, K, n, coefficient a so
0, a
1, a
2, K, a
nCan confirm through matrix form
(formula 4)
The functional value y corresponding for unknown t place just can come out through polynomial computation, promptly
(formula 5)
(formula 6)
At this moment functional value y is converted into vectorial w and n+1 point input signal vector multiplies each other, and w and unknown t and input matrix is relevant constantly.
The higher order polynomial interpolation is used for small sample rate conversion, and input signal is an equal interval sampling.In order to obtain more level and smooth function curve and output reliably, to a series of input signal x
i, x
I+1, x
I+2, K need be each [x
I-int [n/2], K, x
i, x
I+1, K, x
I+int [n/2+0.5]] set up a function f separately
i(x), i.e. segmentation makes up higher order polynomial, obtains a series of w
i, and use function f
i(x) mid portion [x
i, x
I+1] curve of section is used for interpolation output.At this moment, absolute i is constantly taken out, the input time matrix can be considered as constant
(formula 7)
The relative moment of output is t, and t has periodically, and the cycle is s
2, promptly the relative output time of one-period does
t
j=js
1/ s
2-int [js
1/ s
2], j=1,2, L, s
2(formula 8)
Corresponding with it w
jAlso has periodically w
jFor
(formula 9)
Be illustrated in figure 4 as the sketch map of quick small conversion, through w
jThe concrete grammar that obtains small converted output signal is: suppose that input signal has the n+1 point, with x=[x
0, x
1, x
2, L, x
n]
TExpression in the j time output of one-period, is used w
jMultiply by x and obtain 1 output signal, upgrade int [js then
1/ s
2]-int [(j-1) s
1/ s
2] individual input, int [js
1/ s
2]-int [(j-1) s
1/ s
2] value be 1 and upgrade 1 input, be 0 and do not upgrade, accomplish s
2Individual output back j returns the new cycle of 1 beginning.
(b) best small conversion
Best small conversion is based on the polynomial interopolation algorithm that divides the intersegmental high-order condition of continuity, and it defines s
1Individual input interval [0,1], [1,2], L, [i, i+1], L, [s
1-1, s
1] corresponding s
1Individual piecewise function f
j(x) be polynomial of degree n, wherein the corresponding value x of the i of institute at interval border place
iKnown, require f
j(x) satisfy following constraints:
(1) for j=1,2, K, s
1, f
j(1)=x
j, f
1(0)=x
0
(2) for j=1,2, K, s
1,
Subscript (r) representative function f wherein
j(x) r subderivative, r=0,1, K, n-1;
(3) boundary condition satisfies n-1 in following 2 (n-1) set condition
R=1, K, n-1, c
R1, c
R2Be constant, generally can make it is 0;
Consider computational efficiency, generally make function f
j(x) be 3 order polynomials, i.e. f
j(x)=a
kx
3+ b
kx
2+ c
kX+d
kIn a change-over period, input signal overlaps with the head and the tail end points of output signal, i.e. input signal x
0=output signal y
0, input signal
Output signal y
0,
Between point utilize they input interval [0, s
1] in relative position and f
j(x) obtain.Consider s
1, s
2Known and fixing, output signal input interval [0, s
1] in the absolute position [0, s
1/ s
2, 2s
1/ s
2, 3s
1/ s
2, L, s
1] also known and fixing, small conversion can convert a row input signal x and a s into
2* (s
1+ 1) sparse transition matrix B multiplies each other and obtains the process of a row output signal y, sparse transition matrix B only with s
1, s
2And f
j(x) the column constraint condition that is satisfied is relevant.
The concrete computational process of sparse transition matrix B is: at first calculate relative output time t=[t
0, t
1, L, t
S2]=[0, s
1/ s
2, 2s
1/ s
2, 3s
1/ s
2, L, s
1]-int [0, s
1/ s
2, 2s
1/ s
2, 3s
1/ s
2, L, s
1] (formula 10) sparse transition matrix B is the part of matrix Q, Q takes advantage of acquisition by the anti-phase of location matrix T and conditional matrix C, i.e. Q=TC
-, Q is s
2* (n+1) s
1Matrix, sparse transition matrix B are the preceding s of Q
1+ 1 row, T is s
2* (n+1) s
1Matrix, C are (n+1) s
1* (n+1) s
1Matrix.T is specially
(formula 11)
Its reality is by 1 * (n+1) vector
Constitute s as an integral unit
2* s
1Quasi-diagonal matrix,
The position at the capable int [js of j
1/ s
2] row, int [] expression rounds.C specifically is made up of the n+1 sub-matrices
(formula 12)
C wherein
0Be (s
1+ 1) * (s
1(n+1)) matrix, C
1..., C
nBe (s
1-1) * (s
1(n+1)) matrix, C
N+1Be (n-2) * (s
1(n+1)) matrix, C
0Corresponding f
j(x) constraints (1) is specially
(formula 13)
C
j, j=1,2, L, the corresponding f of n
j(x) constraints (2), for
(formula 14)
Wherein
[x
n, x
N-1, L, 1]
(j) v(formula 15)
Expression
x
n, x
N-1, L, 1 (formula 16)
In the j at v place subderivative
C
N+1Corresponding f
j(x) constraints (3) can be chosen wantonly
R=1,2, L, the n-1 in this 2 (n-1) set condition of n-1, if select
As C
N+1In the capable condition of k, C so
N+1In the k behavior
[[x
n, x
N-1, L, 1]
(r) 0, 0] and (formula 17)
If select
As C
N+1In the capable condition of k, C so
N+1In the k behavior
[0, [x
n, x
N-1, L, 1]
(r) 1] (formula 18)
Sparse transition matrix B does
(formula 19)
Be illustrated in figure 5 as the best small conversion sketch map of each grade piece output, the concrete grammar that obtains the output signal of small conversion through sparse transition matrix B is: suppose that input signal has s
1+ 1 point upgrades s at every turn
1The point input signal, output s
2The point signal, then
(formula 20)
Consider the characteristic of sparse matrix, this part output procedure can be revised as pointwise output, and buffer length at this moment reduces, and needs pointwise to upgrade.
Because sparse transition matrix B has only diagonal finite element non-zero (look the data precision decision of calculating required reservation, every row is about 10 to 16 nonzero elements) on every side, promptly B is a sparse matrix, and the memory space of B will be much smaller than s
2* (s
1+ 1), the amount of calculation of the matrix multiplication of it and input buffering simultaneously also will be much smaller than s
2* (s
1+ 1).Be illustrated in figure 6 as s
1=40, s
2=41, n=3, the coefficient distribution map of the sparse transition matrix after 15 quantifications, wherein black partly is 0, has only in leftmost 41 * 41 the submatrix diagonal angle subparticipation output to calculate.
If the result of step S101 cascade transformational analysis is the situation that integer is changed and small conversion is all carried out, execution in step S104 makes up the cascade conversion signal is carried out sample rate conversion so.
The cascade system of sample rate conversion is by input sampling rate f
1, output sampling rate f
2Size and amount of calculation, the conversion of signals quality determines jointly, and is specific as follows:
(1) if f
1>f
2, and require amount of calculation little, and then small conversion is placed at last, as shown in Figure 7;
(2) if f
1>f
2, and require the conversion of signals quality good, then be placed on small conversion before, as shown in Figure 8;
If f
1<f
2, and require amount of calculation little, then be placed on small conversion before, as shown in Figure 8;
(4) if f
1<f
2, and require the conversion of signals quality good, and then small conversion is placed at last, as shown in Figure 7;
(5) small conversion also can be embedded in the integer conversion of cascade (progression of integer conversion is greater than 1), and is as shown in Figure 9, if require the conversion of signals quality good, can design so make intergrade sample rate greater than the target sample rate f
2If require amount of calculation little, can design so make intergrade sample rate less than the target sample rate f
2
Figure 10 is the circuit module figure of sample rate conversion device of a kind of digital signal of embodiment of the present invention, and the function declaration of each module that it comprises is following:
Cascade transformational analysis module 201: according to input sampling rate f
1With output sampling rate f
2Between integer ratios M: the different situations of N, for only carrying out the situation of integer conversion, only carry out situation and the integer conversion of small conversion and the situation that small conversion is all carried out;
Buffer input signal module 202: be used to store input signal, and input signal is sent into integer modular converter or small modular converter be converted to the output signal;
Integer conversion configurations module 203: make up the integer transition matrix;
Integer modular converter 204; The integer transition matrix of the buffer input signal module being sent to the input signal that comes and integer conversion configurations module construction multiplies each other and accomplishes integer conversion;
Small conversion configurations module 205: the higher order polynomial interpolation is used for small sample rate conversion, makes up small converting vector or matrix;
Small modular converter 206: the small transition matrix of the buffer input signal module being sent to the input signal that comes and the small conversion configurations module construction small conversion of completion of multiplying each other;
201 pairs of sample rate conversion of cascade transformational analysis module are decomposed, and sample rate conversion is decomposed into the situation of only carrying out the integer conversion, only carry out the situation of small conversion and the situation that integer is changed and small conversion is all carried out, and are specially:
(a) if the factor that M, N can effectively arrange decompose and make M
1* M
2* L * M
K=M, N
1* N
2* L * N
K=N, and satisfy
I=1,2,L,K
K>=1,1≤M wherein
1, M
2, L, M
K, N
1, N
2, L, N
K<P
Max, carry out the cascade integer so and change signal sampling rate by f
1Convert f into
2
(b) if M, N can not carry out the factor described in (a) to be decomposed, but min (M, N)/| M-N|>P
Max, carry out so small conversion with signal sampling rate by f
1Convert f into
2, the small transfer ratio f of this moment
1: f
2=M: N=s
1: s
2, s wherein
1, s
2There is not further abbreviation of common factor.
(c) if M, N can not carry out the factor described in (a) to be decomposed, but min (M, N)/| M-N|≤P
Max, look for M
1* M
2* L * M
K=M ', N
1* N
2* L * N
K=N ' makes | N '/M '-N/M| is minimum, and satisfies the formula in (a), 1≤M wherein
1, M
2, L, M
K, N
1, N
2, L, N
K<P
Max, K>=1 is carried out the cascade integer so and is changed signal sampling rate by f
1Convert f ' into
2, carry out small conversion again with f '
2Convert f into
2, the small transfer ratio f ' of this moment
2: f
2=MN ': NM '=s
1: s
2, s wherein
1, s
2There is not further abbreviation of common factor.Wherein (a), (b), the P in (c)
MaxInterval be [20,30], be generally 20.
Integer conversion configurations module 203 makes up the integer transition matrix, and the integer transition matrix of each grade is to make up through the vectorial extraction of low pass filter, and the frequency inverted ratio of integers of the k level of integer conversion is M
k: N
k, integer transition matrix A
kBe that a size is N
k* M
kl
kMatrix, be expressed from the next:
Wherein, the low pass filter vector is h
k=[h
k(0), h
k(1), h
k(2), h
k(3), h
k(4), h
k(5), L, h
k(M
kl
kN
k-1)], its length is M
kl
kN
k, its stopband attenuation is controlled at about 80 to 100dB; l
kThe length that is used for control filters, general value is about 30, cut-off frequency is 1/max (M
k, N
k).But in order to reduce the influence of transition band aliasing, need stay certain redundancy, can cut-off frequency be compressed to originally about 0.95 downwards, promptly cut-off frequency is 0.95/max (M
k, N
k).
Be depicted as the through transport of integer switching stage like Figure 10 A and make the mode sketch map, the conversion of the integer of each grade obtains exporting the signal realization through input signal and integer transition matrix are multiplied each other, and its detailed process is:
The calculating of integer converted output signal is periodic, if each input signal of participating in calculating has M
kl
kPoint is used
Expression is stored in the
input buffering module 202, in the j time output of one-period, with integer transition matrix A
kThe capable x of multiply by of j obtain 1 output signal, upgrade int [jN then
k/ M
k]-int [(j-1) N
k/ M
k] individual input, if int [jM
k/ N
k]-int [(j-1) M
k/ N
k] be 0, then do not upgrade, accomplish N
kIndividual output back j returns the new calculating of 1 beginning.
Small conversion configurations module 205 adopts the higher order polynomial interpolation to make up small transition matrix or vector, and the condition that satisfies based on higher order polynomial is different, can be divided into quick small conversion and two kinds of situation of best small conversion.
If adopt the higher order polynomial interpolation, and input signal is equal interval sampling, and so small conversion configurations module 205 adopts quick small conversion, makes up small converting vector w
j, its computational methods are:
In order to obtain more level and smooth function curve and output reliably, to a series of input signal x
i, x
I+1, x
I+2, L need be each [x
I-int [n/2], L, x
i, x
I+1, L, x
I+int [n/2+0.5]] set up a function f separately
i(x), i.e. segmentation makes up higher order polynomial, obtains a series of vectorial w
i, and use function f
i(x) mid portion [x
i, x
I+1] curve of section is used for interpolation output, then absolute i constantly taken out, input matrix constantly can be regarded as constant
The relative moment of output then is t=is
1/ s
2-int [is
1/ s
2], t has periodically, and the cycle is s
2, promptly the relative output time of one-period does
t
j=js
1/s
2-int[js
1/s
2],j=1,2,L,s
2
The vectorial w that it is corresponding
jAlso has periodically w
jFor
N rank polynomial function does
f(x)=a
nx
n+a
n-1x
n-1+L+a
1x+a
0
Known f (t
j)=x
j, j=0,1, K, n, coefficient a so
0, a
1, a
2, K, a
nCan confirm through matrix form
The functional value y corresponding for unknown t place just can come out through polynomial computation, promptly
At this moment functional value y is converted into vectorial w and n+1 point input signal vector multiplies each other, and w and unknown t and input matrix is relevant constantly.
Be depicted as small transition operation mode sketch map like Figure 10 B, small modular converter wherein obtains exporting signal through input signal and small converting vector are multiplied each other and realizes that its detailed process is: input signal has the n+1 point, with x=[x
0, x
1, x
2, L, x
n]
TExpression is stored in the input buffering module 202, in the j time output of one-period, with small converting vector w
jMultiply by x and obtain 1 output signal, upgrade int [js then
1/ s
2]-int [(j-1) s
1/ s
2] individual input, int [js
1/ s
2]-int [(j-1) s
1/ s
2] value be 1 and upgrade 1 input, be 0 and do not upgrade, accomplish s
2Individual output back j returns the new cycle of 1 beginning.
If adopt based on the polynomial interopolation algorithm that divides the intersegmental high-order condition of continuity, 205 of so small conversion configurations moulds adopt best small conversion, make up small transition matrix; This algorithm definition s
1Individual input interval [0,1], [1,2], L, [i, i+1], L, [s
1-1, s
2] corresponding s
1Individual piecewise function f
j(x) be polynomial of degree n, wherein the corresponding value x of the i of institute at interval border place
iKnown, require f
j(x) satisfy following constraints:
(1) for j=1,2, K, s
1, f
j(1)=x
j, f
1(0)=x
0
(2) for j=1,2, K, s
1-1,
Subscript (r) representative function f wherein
j(x) r subderivative, r=0,1, K, n-1;
(3) boundary condition satisfies n-1 in following 2 (n-1) set condition
R=1, K, n-1, c
R1, c
R2Be constant, generally can make it is 0.
Piecewise function f
j(x) be generally 3 order polynomials, i.e. f
j(x)=a
kx
3+ b
kx
2+ c
kX+d
kIn a change-over period, input signal overlaps with the head and the tail end points of output signal, i.e. input signal x
0=output signal y
0, input signal
Output signal y
0,
Between point utilize they input interval [0, s
1] in relative position and f
j(x) obtain.Consider s
1, s
2Known and fixing, output signal input interval [0, s
1] in the absolute position [0, s
1/ s
2, 2s
1/ s
2, 3s
1/ s
2, L, s
1] also known and fixing, small conversion can convert a row input signal x and a s into
2* (s
1+ 1) sparse transition matrix B multiplies each other and obtains the process of a row output signal y, sparse transition matrix B only with s
1, s
2And f
j(x) the column constraint condition that is satisfied is relevant.
The concrete computational process of sparse transition matrix B is:
At first calculate relative output time
T=[t
0, t
1, L, t
S2]=[0, s
1/ s
2, 2s
1/ s
2, 3s
1/ s
2, L, s
1]-int [0, s
1/ s
2, 2s
1/ s
2, 3s
1/ s
2, L, s
1] sparse transition matrix B is the part of matrix Q, Q takes advantage of acquisition by the anti-phase of location matrix T and conditional matrix C, i.e. Q=TC
-, Q is s
2* (n+1) s
1Matrix, sparse transition matrix B are the preceding s of Q
1+ 1 row, T is s
2* (n+1) s
1Matrix, C are (n+1) s
1* (n+1) s
1Matrix;
T representes with following formula:
Its reality is by 1 * (n+1) vector
Constitute s as an integral unit
2* s
1Quasi-diagonal matrix,
The position at the capable int [js of j
1/ s
2] row, int [] expression rounds;
C is made up of the n+1 sub-matrices
C wherein
0Be (s
1+ 1) * (s
1(n+1)) matrix, C
1..., C
nBe (s
1-1) * (s
1(n+1)) matrix, C
N+1Be (n-2) * (s
1(n+1)) matrix,
C
0Corresponding f
j(x) constraints (1) is expressed from the next:
C
j, j=1,2, L, the corresponding f of n
j(x) constraints (2) is expressed from the next:
[x wherein
n, x
N-1, L, 1]
(j) vExpression x
n, x
N-1, L, 1 in the j at v place subderivative;
C
N+1Corresponding f
j(x) constraints (3) can be chosen wantonly
R=1,2, L, the n-1 in this 2 (n-1) set condition of n-1, if select
As C
N+1In the capable condition of k, C so
N+1In the k behavior
[[x
n,x
n-1,L,1]
(r) 0,0]
If select
As C
N+1In the capable condition of k, C so
N+1In the k behavior
[0,[x
n,x
n-1,L,1]
(r) 1]
Sparse transition matrix B does
Be depicted as small transition operation mode sketch map like Figure 10 B, small modular converter wherein obtains exporting signal through sparse transition matrix B and input signal are multiplied each other and realizes that its concrete grammar is:
Input signal has s
1+ 1 point upgrades s at every turn
1The point input signal, output s
2The point signal
Consider the characteristic of sparse matrix, this part output procedure can be revised as pointwise output, and buffer length at this moment reduces, and needs pointwise to upgrade.
The analysis result of cascade transformational analysis module 201 is integer conversion when all carrying out with small conversion, and the connected mode that cascade is changed is by input sampling rate f
1, output sampling rate f
2Size and amount of calculation, demand on signal quality determines jointly.
(1) if f
1>f
2, and require amount of calculation little, then small conversion is placed at last, shown in Figure 10 C;
(2) if f
1>f
2, and require the conversion of signals quality good, then be placed on small conversion before, shown in Figure 10 D;
(3) if f
1<f
2, and require amount of calculation little, then be placed on small conversion before, shown in Figure 10 D;
(4) if f
1>f
2, and require the conversion of signals quality good, then small conversion is placed at last, shown in Figure 10 C;
(5) small conversion also can be embedded in the integer conversion of cascade, and shown in Figure 10 E, and the progression of integer conversion is greater than 1, if require the conversion of signals quality good, the sample rate that makes intergrade when making up cascade system so is greater than the target sample rate f
2If require amount of calculation little, the sample rate that makes intergrade when making up cascade system so is less than the target sample rate f
2
Forwarding the signal of 32000Hz to 44100Hz is processing common in the digital audio processing, the M that signal sampling rate is corresponding, and N is respectively 320,441.If adopt traditional bank of filters mode; The length of filter is that (if require excess bandwidth is 1/10 of passband to 320 * 441 * l; L must be greater than 20 so), so long filter, each sample mean consumes 320l multiplication; Per second consumes 44100 * 320l time multiplication, and the height of this amount of calculation almost is unacceptable.
And employing the present invention forwards the signal of 32000Hz to 44100Hz, and the signal that can change into 32000Hz forwards 44000Hz to; The conversion of use integer, corresponding M ', N ' is respectively 8; 11, the length of filter is 8 * 11 * l, and per second consumes 44000 * 8l time multiplication; Small conversion is transformed into 44100Hz with 44000Hz, s in the cascade
1, s
2Be respectively 440,441, if adopt quick small conversion (3 rank), per second consumes multiplication approximately 44100 * 4 times so, if adopt best small conversion (3 rank), per second consumes multiplication approximately 44100 * 12 times.After the cascade altogether per second consume 44000 * 8l+44000 * 4 time multiplication or 44000 * 8l+44000 * 12 time multiplication, be far smaller than and adopt the conventional filter group of methods.
Quick small conversion provides different switching signal quality with best small conversion, and this quality is mainly weighed with harmonic distortion.Total harmonic wave harmonic distortion is defined as input sine wave, the size of the relative incoming frequency component of harmonic component in the output signal, and total harmonic wave harmonic distortion is big more, and harmonic component is strong more, and distorted signals is big more.Figure 11 has provided quick small conversion (3 rank) and best small conversion (3 rank) under different input frequency signal situation, and signal is transformed into the total harmonic distortion (dB metering) behind the 44100Hz from 44000Hz.Harmonic distortion (solid line among the figure) all faster small conversion (dotted line among the figure) on all frequencies that can see best small conversion has certain advantage, the quick relatively small conversion of best small conversion, and signal fidelity is higher.
Figure 12 and Figure 13 have provided three kinds of different sample rate conversion regimes the sample rate of a sine wave have been converted to the signal spectrum figure behind the 44100hz from 32000Hz; The output sinusoidal signal frequency 2000Hz of Figure 12 wherein; The output sinusoidal signal frequency 12000Hz of Figure 13; The left side is the method (method 1) that directly adopts cubic curve property interpolation among two figure; The centre is the method (method 2) that the conversion of cascade integer combines quick small conversion, and the right is the method (method 3) that the conversion of cascade integer combines best small conversion.Can see from Figure 12; Method 1 has a large amount of harmonic waves and noise profile on frequency axis; The harmonic wave of method 2 and noise have had certain decay away from center signal the time, the harmonic wave of method 3 and noise are decayed away from center signal the time fast, and its harmonic wave and noise also are less than method 2.Can see that from Figure 13 harmonic wave and noise have increase tendency, method 1 is available hardly, and the harmonic wave of method 2 and noise are also bigger, and method 3 can provide relative higher signal quality.
Figure 14 and Figure 15 have provided three kinds of different sample rate conversion regimes the sample rate of one section music have been converted to signal time-frequency figure and the spectrogram of signal synchronization behind the 44100hz from 32000Hz; The left side is the method (method 1) that directly adopts cubic curve property interpolation among Figure 14; The centre is the method (method 2) that the conversion of cascade integer combines quick small conversion, and the right is the method (method 3) that the conversion of cascade integer combines best small conversion.Light ash among Figure 15, the signal after dark-grey and black difference corresponding method 1, method 2 are handled with method 3.Can see from Figure 14; The much noise disperse that method 1 is produced is on whole frequency axis; Seriously reduced signal quality; Method 2 and method 3 have all been controlled the diffusion of noise well at stopband (16kHz is to 22kHz), and this also has good embodiment in Figure 15, and wherein method 3 is littler at the noise of stopband.Actual audition shows that method 3 will have higher fidelity than method 2.
Compared with prior art; The present invention is through analyzing the different situations of the integer ratios between input sampling rate and the output sampling rate; Sample rate conversion is decomposed; And make up the cascade conversion according to the size of quality requirement and input sampling rate, output sampling rate the sample rate of input signal is transformed, can realize with lower amount of calculation digital signals sampling rate conversion, and make the signal quality that obtains after the conversion higher.
It is understandable that, concerning those of ordinary skills, can be equal to replacement or change according to technical scheme of the present invention and inventive concept thereof, and all these changes or replacement all should belong to the protection range of the appended claim of the present invention.