Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-10-02 10:05:41 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-10-02 10:05:41 +0300
commit10c85e3efc6ff93e925963641e2c4f27443a1084 (patch)
treefc2a31e57ce76bbb3b980048dfa8aa0eaf7452aa
parent29942f65353e50abbb6ce5ef4ec4190ee8df4ffe (diff)
Fewer crashes...
-rw-r--r--dnn/lpcnet_enc.c2
-rw-r--r--dnn/nnet.c2
-rw-r--r--dnn/pitchdnn.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/dnn/lpcnet_enc.c b/dnn/lpcnet_enc.c
index addcdfa5..a7f10da9 100644
--- a/dnn/lpcnet_enc.c
+++ b/dnn/lpcnet_enc.c
@@ -166,7 +166,7 @@ void compute_frame_features(LPCNetEncState *st, const float *in) {
/*printf("\n");*/
}
dnn_pitch = compute_pitchdnn(&st->pitchdnn, st->if_features, st->xcorr_features);
- /*printf("%f\n", pitch);*/
+ /*printf("%f\n", dnn_pitch);*/
/* Cross-correlation on half-frames. */
for (sub=0;sub<2;sub++) {
int off = sub*FRAME_SIZE/2;
diff --git a/dnn/nnet.c b/dnn/nnet.c
index d5ef904e..7a995cf4 100644
--- a/dnn/nnet.c
+++ b/dnn/nnet.c
@@ -432,7 +432,7 @@ void conv2d_float(float *out, const float *weights, int in_channels, int out_cha
}
}
-#define MAX_CONV2D_INPUTS 2048
+#define MAX_CONV2D_INPUTS 8192
void compute_conv2d(const Conv2dLayer *conv, float *out, float *mem, const float *in, int len2, int activation)
{
diff --git a/dnn/pitchdnn.c b/dnn/pitchdnn.c
index 98fb410e..8067ec18 100644
--- a/dnn/pitchdnn.c
+++ b/dnn/pitchdnn.c
@@ -18,8 +18,8 @@ float compute_pitchdnn(
float if1_out[DENSE_IF_UPSAMPLER_1_OUT_SIZE];
float downsampler_in[NB_XCORR_FEATURES + DENSE_IF_UPSAMPLER_2_OUT_SIZE];
float downsampler_out[DENSE_DOWNSAMPLER_OUT_SIZE];
- float conv1_tmp1[NB_XCORR_FEATURES + 2] = {0};
- float conv1_tmp2[NB_XCORR_FEATURES + 2] = {0};
+ float conv1_tmp1[(NB_XCORR_FEATURES + 2)*8] = {0};
+ float conv1_tmp2[(NB_XCORR_FEATURES + 2)*8] = {0};
float output[DENSE_FINAL_UPSAMPLER_OUT_SIZE];
int i;
int pos=0;
@@ -33,8 +33,8 @@ float compute_pitchdnn(
/* xcorr*/
OPUS_COPY(&conv1_tmp1[1], xcorr_features, NB_XCORR_FEATURES);
compute_conv2d(&model->conv2d_1, &conv1_tmp2[1], st->xcorr_mem1, conv1_tmp1, NB_XCORR_FEATURES, ACTIVATION_TANH);
- compute_conv2d(&model->conv2d_1, &conv1_tmp1[1], st->xcorr_mem2, conv1_tmp2, NB_XCORR_FEATURES, ACTIVATION_TANH);
- compute_conv2d(&model->conv2d_1, downsampler_in, st->xcorr_mem3, conv1_tmp1, NB_XCORR_FEATURES, ACTIVATION_TANH);
+ compute_conv2d(&model->conv2d_2, &conv1_tmp1[1], st->xcorr_mem2, conv1_tmp2, NB_XCORR_FEATURES, ACTIVATION_TANH);
+ compute_conv2d(&model->conv2d_3, downsampler_in, st->xcorr_mem3, conv1_tmp1, NB_XCORR_FEATURES, ACTIVATION_TANH);
compute_generic_dense(&model->dense_downsampler, downsampler_out, downsampler_in, ACTIVATION_TANH);
compute_generic_gru(&model->gru_1_input, &model->gru_1_recurrent, st->gru_state, downsampler_out);