float Sn_[2*N]; /* synthesised speech */
int i; /* loop variable */
int frames;
- float prev_Wo;
+ float prev_Wo, prev__Wo;
float pitch;
int voiced1 = 0;
/*
When decimation is enabled we only send LSPs to the decoder
- on odd frames. In this case we encode every second off
- frame (i.e. every 3rd frame) by quantising the difference
- between the 1st frames LSPs and this frames:
+ on odd frames. In the Delta-time LSPs case we encode every
+ second odd frame (i.e. every 3rd frame) by quantising the
+ difference between the 1st frames LSPs and this frames:
10ms, frame 1: send "full" LSP frame
20ms, frame 2: discard (interpolate at decoder)
if (fout != NULL) fwrite(buf,sizeof(short),N,fout);
}
prev_Wo = TWO_PI/pitch;
+ prev__Wo = Wo;
}
fclose(fin);
{
int i;
- for(i=1; i<5; i++) {
-
- /*
- if (lsp[i] - lsp[i-1] < PI*(12.5/4000.0))
- lsp[i] = lsp[i-1] + PI*(12.5/4000.0);
- */
+ for(i=1; i<4; i++) {
- if ((lsp[i] - lsp[i-1]) < 12.5*(PI/4000))
- lsp[i] = lsp[i-1] + 12.5*(PI/4000.0);
+ if ((lsp[i] - lsp[i-1]) < 25*(PI/4000.0))
+ lsp[i] = lsp[i-1] + 50.0*(PI/4000.0);
}
different quanstisers.
*/
- for(i=5; i<8; i++) {
- if (lsp[i] - lsp[i-1] < PI*(25.0/4000.0))
- lsp[i] = lsp[i-1] + PI*(25.0/4000.0);
- }
- for(i=8; i<order; i++) {
- if (lsp[i] - lsp[i-1] < PI*(75.0/4000.0))
- lsp[i] = lsp[i-1] + PI*(75.0/4000.0);
+ for(i=4; i<order; i++) {
+ if (lsp[i] - lsp[i-1] < PI*(50.0/4000.0))
+ lsp[i] = lsp[i-1] + PI*(100.0/4000.0);
}
}
AUTHOR......: David Rowe
DATE CREATED: 22/8/2010
- Decodes energy using a WO_BITS quantiser.
+ Decodes energy using a E_LEVELS quantiser.
\*---------------------------------------------------------------------------*/