Remove support for LPCNet quantization

This commit is contained in:
Jean-Marc Valin 2023-06-22 00:44:45 -04:00
parent bfa01f1a1c
commit 247e6a587c
No known key found for this signature in database
GPG key ID: 531A52533318F00A
8 changed files with 15 additions and 972 deletions

View file

@ -279,43 +279,3 @@ void lpcnet_synthesize_impl(LPCNetState *lpcnet, const float *features, short *o
LPCNET_EXPORT void lpcnet_synthesize(LPCNetState *lpcnet, const float *features, short *output, int N) {
lpcnet_synthesize_impl(lpcnet, features, output, N, 0);
}
#ifndef OPUS_BUILD
LPCNET_EXPORT int lpcnet_decoder_get_size()
{
return sizeof(LPCNetDecState);
}
LPCNET_EXPORT int lpcnet_decoder_init(LPCNetDecState *st)
{
memset(st, 0, lpcnet_decoder_get_size());
lpcnet_init(&st->lpcnet_state);
return 0;
}
LPCNET_EXPORT LPCNetDecState *lpcnet_decoder_create()
{
LPCNetDecState *st;
st = malloc(lpcnet_decoder_get_size());
lpcnet_decoder_init(st);
return st;
}
LPCNET_EXPORT void lpcnet_decoder_destroy(LPCNetDecState *st)
{
free(st);
}
LPCNET_EXPORT int lpcnet_decode(LPCNetDecState *st, const unsigned char *buf, short *pcm)
{
int k;
float features[4][NB_TOTAL_FEATURES];
decode_packet(features, st->vq_mem, buf);
for (k=0;k<4;k++) {
lpcnet_synthesize(&st->lpcnet_state, features[k], &pcm[k*FRAME_SIZE], FRAME_SIZE);
}
return 0;
}
#endif