aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2021-01-20 00:25:59 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-01-20 00:25:59 +0000
commit7b41b3fee7ce280d9f89f8e32250d713bf11c352 (patch)
treee078a8aad46d844e49ce7684abf99a550acd3bee
parent4e713ba768e12d4aa2ffd0649cddbada03a3a263 (diff)
parent2d2ac94470a6d6e7a9a1b61fd11f4cf2a336b1cc (diff)
downloadrnnoise-7b41b3fee7ce280d9f89f8e32250d713bf11c352.tar.gz
Upgrade rnnoise to 125d8a56e0049728c86c9a575dab348fc9523e96 am: 08aa096f48 am: 2d2ac94470
Original change: https://android-review.googlesource.com/c/platform/external/rnnoise/+/1553894 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Id1014f139da3f8253f7d8cce8cd5e6e4735b735e
-rw-r--r--METADATA12
-rw-r--r--README4
-rw-r--r--TRAINING-README (renamed from TRAINING)0
-rw-r--r--examples/rnnoise_demo.c4
-rw-r--r--include/rnnoise.h7
-rw-r--r--src/celt_lpc.c2
-rw-r--r--src/kiss_fft.c2
7 files changed, 22 insertions, 9 deletions
diff --git a/METADATA b/METADATA
index eb57da2..15f6208 100644
--- a/METADATA
+++ b/METADATA
@@ -1,7 +1,5 @@
name: "rnnoise"
-description:
- "Recurrent neural network for audio noise reduction"
-
+description: "Recurrent neural network for audio noise reduction"
third_party {
url {
type: HOMEPAGE
@@ -11,7 +9,11 @@ third_party {
type: GIT
value: "https://github.com/xiph/rnnoise.git"
}
- version: "9acc1e5a633e0961a5895a73204df24744f199b6"
- last_upgrade_date { year: 2020 month: 6 day: 3 }
+ version: "125d8a56e0049728c86c9a575dab348fc9523e96"
license_type: NOTICE
+ last_upgrade_date {
+ year: 2021
+ month: 1
+ day: 18
+ }
}
diff --git a/README b/README
index 88fc79c..da30b69 100644
--- a/README
+++ b/README
@@ -15,3 +15,7 @@ PCM files sampled at 48 kHz. It can be used as:
./examples/rnnoise_demo <number of channels> <maximum attenuation> < input.raw > output.raw
The output is also a 16-bit raw PCM file.
+
+The latest version of the source is available from
+https://gitlab.xiph.org/xiph/rnnoise . The github repository
+is a convenience copy.
diff --git a/TRAINING b/TRAINING-README
index 86c5a4e..86c5a4e 100644
--- a/TRAINING
+++ b/TRAINING-README
diff --git a/examples/rnnoise_demo.c b/examples/rnnoise_demo.c
index 83d0709..c70343d 100644
--- a/examples/rnnoise_demo.c
+++ b/examples/rnnoise_demo.c
@@ -41,8 +41,8 @@ int main(int argc, char **argv) {
fprintf(stderr, "usage: %s <noisy speech> <output denoised>\n", argv[0]);
return 1;
}
- f1 = fopen(argv[1], "r");
- fout = fopen(argv[2], "w");
+ f1 = fopen(argv[1], "rb");
+ fout = fopen(argv[2], "wb");
while (1) {
short tmp[FRAME_SIZE];
fread(tmp, sizeof(short), FRAME_SIZE, f1);
diff --git a/include/rnnoise.h b/include/rnnoise.h
index 67f0b06..511a976 100644
--- a/include/rnnoise.h
+++ b/include/rnnoise.h
@@ -30,6 +30,9 @@
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef RNNOISE_EXPORT
# if defined(WIN32)
@@ -62,4 +65,8 @@ RNNOISE_EXPORT RNNModel *rnnoise_model_from_file(FILE *f);
RNNOISE_EXPORT void rnnoise_model_free(RNNModel *model);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/celt_lpc.c b/src/celt_lpc.c
index 5d7ffa4..521351e 100644
--- a/src/celt_lpc.c
+++ b/src/celt_lpc.c
@@ -103,7 +103,7 @@ void celt_fir(
{
opus_val32 sum[4];
sum[0] = SHL32(EXTEND32(x[i ]), SIG_SHIFT);
- sum[1] = SHL32(EXTEND32(x[i+1]), SIG_SHIFT),
+ sum[1] = SHL32(EXTEND32(x[i+1]), SIG_SHIFT);
sum[2] = SHL32(EXTEND32(x[i+2]), SIG_SHIFT);
sum[3] = SHL32(EXTEND32(x[i+3]), SIG_SHIFT);
xcorr_kernel(rnum, x+i-ord, sum, ord);
diff --git a/src/kiss_fft.c b/src/kiss_fft.c
index 922dacc..d6b9f26 100644
--- a/src/kiss_fft.c
+++ b/src/kiss_fft.c
@@ -39,7 +39,7 @@
#define CUSTOM_MODES
/* The guts header contains all the multiplication and addition macros that are defined for
- complex numbers. It also delares the kf_ internal functions.
+ complex numbers. It also declares the kf_ internal functions.
*/
static void kf_bfly2(