mirror of
https://github.com/xiph/opus.git
synced 2025-05-15 16:08:30 +00:00
Remove support for LPCNet quantization
This commit is contained in:
parent
bfa01f1a1c
commit
247e6a587c
8 changed files with 15 additions and 972 deletions
40
dnn/lpcnet.c
40
dnn/lpcnet.c
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue