mirror of
https://github.com/xiph/opus.git
synced 2025-05-17 08:58:30 +00:00
Moving LPCNetState
This commit is contained in:
parent
e63292bd56
commit
fe608dfc51
2 changed files with 17 additions and 16 deletions
17
dnn/lpcnet.c
17
dnn/lpcnet.c
|
@ -31,9 +31,8 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "lpcnet.h"
|
#include "lpcnet.h"
|
||||||
|
#include "lpcnet_private.h"
|
||||||
|
|
||||||
|
|
||||||
#define LPC_ORDER 16
|
|
||||||
#define PREEMPH 0.85f
|
#define PREEMPH 0.85f
|
||||||
|
|
||||||
#define PITCH_GAIN_FEATURE 37
|
#define PITCH_GAIN_FEATURE 37
|
||||||
|
@ -41,20 +40,6 @@
|
||||||
|
|
||||||
#define FRAME_INPUT_SIZE (NB_FEATURES + EMBED_PITCH_OUT_SIZE)
|
#define FRAME_INPUT_SIZE (NB_FEATURES + EMBED_PITCH_OUT_SIZE)
|
||||||
|
|
||||||
#define SAMPLE_INPUT_SIZE (2*EMBED_SIG_OUT_SIZE + EMBED_EXC_OUT_SIZE + FEATURE_DENSE2_OUT_SIZE)
|
|
||||||
|
|
||||||
#define FEATURES_DELAY (FEATURE_CONV1_DELAY + FEATURE_CONV2_DELAY)
|
|
||||||
struct LPCNetState {
|
|
||||||
NNetState nnet;
|
|
||||||
int last_exc;
|
|
||||||
float last_sig[LPC_ORDER];
|
|
||||||
float old_input[FEATURES_DELAY][FEATURE_CONV2_OUT_SIZE];
|
|
||||||
float old_lpc[FEATURES_DELAY][LPC_ORDER];
|
|
||||||
float old_gain[FEATURES_DELAY];
|
|
||||||
int frame_count;
|
|
||||||
float deemph_mem;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void print_vector(float *x, int N)
|
static void print_vector(float *x, int N)
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "freq.h"
|
#include "freq.h"
|
||||||
#include "lpcnet.h"
|
#include "lpcnet.h"
|
||||||
|
#include "nnet_data.h"
|
||||||
|
#include "celt_lpc.h"
|
||||||
|
|
||||||
#define BITS_PER_CHAR 8
|
#define BITS_PER_CHAR 8
|
||||||
|
|
||||||
|
@ -18,6 +20,20 @@
|
||||||
|
|
||||||
#define FORBIDDEN_INTERP 7
|
#define FORBIDDEN_INTERP 7
|
||||||
|
|
||||||
|
#define FEATURES_DELAY (FEATURE_CONV1_DELAY + FEATURE_CONV2_DELAY)
|
||||||
|
|
||||||
|
struct LPCNetState {
|
||||||
|
NNetState nnet;
|
||||||
|
int last_exc;
|
||||||
|
float last_sig[LPC_ORDER];
|
||||||
|
float old_input[FEATURES_DELAY][FEATURE_CONV2_OUT_SIZE];
|
||||||
|
float old_lpc[FEATURES_DELAY][LPC_ORDER];
|
||||||
|
float old_gain[FEATURES_DELAY];
|
||||||
|
int frame_count;
|
||||||
|
float deemph_mem;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct LPCNetEncState{
|
struct LPCNetEncState{
|
||||||
float analysis_mem[OVERLAP_SIZE];
|
float analysis_mem[OVERLAP_SIZE];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue