Some work on index packing
This commit is contained in:
parent
bc5cedf26f
commit
29ccab8aac
5 changed files with 16 additions and 8 deletions
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include "cwrs.h"
|
||||
|
||||
/* Algebraic pulse-base quantiser. The signal x is replaced by the sum of the pitch
|
||||
a combination of pulses such that its norm is still equal to 1 */
|
||||
|
@ -94,7 +95,7 @@ void alg_quant(float *x, int N, int K, float *p)
|
|||
/* Improved algebraic pulse-base quantiser. The signal x is replaced by the sum of the pitch
|
||||
a combination of pulses such that its norm is still equal to 1. The only difference with
|
||||
the quantiser above is that the search is more complete. */
|
||||
void alg_quant2(float *x, int N, int K, float *p)
|
||||
int alg_quant2(float *x, int N, int K, float *p)
|
||||
{
|
||||
int L = 5;
|
||||
//float tata[200];
|
||||
|
@ -236,6 +237,10 @@ void alg_quant2(float *x, int N, int K, float *p)
|
|||
for (i=0;i<N;i++)
|
||||
x[i] *= E;
|
||||
}
|
||||
int comb[K];
|
||||
int signs[K];
|
||||
pulse2comb(N, K, comb, signs, iy[0]);
|
||||
return icwrs(N, K, comb, signs);
|
||||
}
|
||||
|
||||
/* Just replace the band with noise of unit energy */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue