Commit 76542a3e authored by Alessio Bazzica's avatar Alessio Bazzica Committed by Commit Bot

RNNoise lib cleaning and C-C++ porting

The imported 3pp code has been cleaned and translated to C++.
Build targets will be added in a separate CL.

Bug: webrtc:9076
Change-Id: Ia53a042a842db734199271691c7b7c26e09b8ae0
Reviewed-on: https://chromium-review.googlesource.com/983557Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Commit-Queue: Ale Bzk <alessiob@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548115}
parent 4f1d8faf
......@@ -14,8 +14,11 @@ RNNoise is a noise suppression library based on a recurrent neural network.
The library is used for speech processing in WebRTC.
Local Modifications:
Only retaining COPYING and from src/ the following files:
- kiss_fft.c, kiss_fft.h, _kiss_fft_guts.h
- rnn.c
- rnn_data.c
- tansig_table.h
* Only retaining COPYING and from src/ the following files:
- kiss_fft.c, kiss_fft.h
- rnn.c
- rnn_data.c
- tansig_table.h
* rnn_data.c cleaned and renamed into rnn_vad_weights.h
* rnn.c merged with tansig_table.h, cleaned and renamed into rnn_activations.h
* KissFFT: non-floating point parts removed, code clean, from C to C++
/*Copyright (c) 2003-2004, Mark Borgerding
Lots of modifications by Jean-Marc Valin
Copyright (c) 2005-2007, Xiph.Org Foundation
Copyright (c) 2008, Xiph.Org Foundation, CSIRO
Copyright (c) 2018, The WebRTC project authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.*/
#include "third_party/rnnoise/kiss_fft.h"
#include <cassert>
#include <cmath>
#include <utility>
namespace rnnoise {
namespace {
void kf_bfly2(std::complex<float>* Fout, int m, int N) {
if (m == 1) {
for (int i = 0; i < N; i++) {
const std::complex<float> t = Fout[1];
Fout[1] = Fout[0] - t;
Fout[0] += t;
Fout += 2;
}
} else {
constexpr float tw = 0.7071067812f;
// We know that m==4 here because the radix-2 is just after a radix-4.
assert(m == 4);
for (int i = 0; i < N; i++) {
std::complex<float>* Fout2 = Fout + 4;
std::complex<float> t = Fout2[0];
Fout2[0] = Fout[0] - t;
Fout[0] += t;
t.real((Fout2[1].real() + Fout2[1].imag()) * tw);
t.imag((Fout2[1].imag() - Fout2[1].real()) * tw);
Fout2[1] = Fout[1] - t;
Fout[1] += t;
t.real(Fout2[2].imag());
t.imag(-Fout2[2].real());
Fout2[2] = Fout[2] - t;
Fout[2] += t;
t.real((Fout2[3].imag() - Fout2[3].real()) * tw);
t.imag(-(Fout2[3].imag() + Fout2[3].real()) * tw);
Fout2[3] = Fout[3] - t;
Fout[3] += t;
Fout += 8;
}
}
}
void kf_bfly4(std::complex<float>* Fout,
const size_t fstride,
const KissFft::KissFftState* st,
int m,
int N,
int mm) {
assert(Fout);
assert(st);
if (m == 1) {
// Degenerate case where all the twiddles are 1.
for (int i = 0; i < N; i++) {
std::complex<float> scratch0 = Fout[0] - Fout[2];
Fout[0] += Fout[2];
std::complex<float> scratch1 = Fout[1] + Fout[3];
Fout[2] = Fout[0] - scratch1;
Fout[0] += scratch1;
scratch1 = Fout[1] - Fout[3];
Fout[1].real(scratch0.real() + scratch1.imag());
Fout[1].imag(scratch0.imag() - scratch1.real());
Fout[3].real(scratch0.real() - scratch1.imag());
Fout[3].imag(scratch0.imag() + scratch1.real());
Fout += 4;
}
} else {
std::complex<float> scratch[6];
const int m2 = 2 * m;
const int m3 = 3 * m;
std::complex<float>* Fout_beg = Fout;
for (int i = 0; i < N; i++) {
Fout = Fout_beg + i * mm;
const std::complex<float>* tw1;
const std::complex<float>* tw2;
const std::complex<float>* tw3;
tw3 = tw2 = tw1 = &st->twiddles[0];
assert(m % 4 == 0); // |m| is guaranteed to be a multiple of 4.
for (int j = 0; j < m; j++) {
scratch[0] = Fout[m] * *tw1;
scratch[1] = Fout[m2] * *tw2;
scratch[2] = Fout[m3] * *tw3;
scratch[5] = *Fout - scratch[1];
Fout[0] += scratch[1];
scratch[3] = scratch[0] + scratch[2];
scratch[4] = scratch[0] - scratch[2];
Fout[m2] = *Fout - scratch[3];
tw1 += fstride;
tw2 += fstride * 2;
tw3 += fstride * 3;
Fout[0] += scratch[3];
Fout[m].real(scratch[5].real() + scratch[4].imag());
Fout[m].imag(scratch[5].imag() - scratch[4].real());
Fout[m3].real(scratch[5].real() - scratch[4].imag());
Fout[m3].imag(scratch[5].imag() + scratch[4].real());
++Fout;
}
}
}
}
void kf_bfly3(std::complex<float>* Fout,
const size_t fstride,
const KissFft::KissFftState* st,
int m,
int N,
int mm) {
assert(Fout);
assert(st);
const size_t m2 = 2 * m;
const std::complex<float>*tw1, *tw2;
std::complex<float> scratch[5];
std::complex<float> epi3;
std::complex<float>* Fout_beg = Fout;
epi3 = st->twiddles[fstride * m];
for (int i = 0; i < N; i++) {
Fout = Fout_beg + i * mm;
tw1 = tw2 = &st->twiddles[0];
size_t k = m;
do {
scratch[1] = Fout[m] * *tw1;
scratch[2] = Fout[m2] * *tw2;
scratch[3] = scratch[1] + scratch[2];
scratch[0] = scratch[1] - scratch[2];
tw1 += fstride;
tw2 += fstride * 2;
Fout[m] = Fout[0] - 0.5f * scratch[3];
scratch[0] *= epi3.imag();
Fout[0] += scratch[3];
Fout[m2].real(Fout[m].real() + scratch[0].imag());
Fout[m2].imag(Fout[m].imag() - scratch[0].real());
Fout[m].real(Fout[m].real() - scratch[0].imag());
Fout[m].imag(Fout[m].imag() + scratch[0].real());
++Fout;
} while (--k);
}
}
void kf_bfly5(std::complex<float>* Fout,
const size_t fstride,
const KissFft::KissFftState* st,
int m,
int N,
int mm) {
assert(Fout);
assert(st);
std::complex<float> scratch[13];
const std::complex<float>* tw;
std::complex<float> ya, yb;
std::complex<float>* const Fout_beg = Fout;
ya = st->twiddles[fstride * m];
yb = st->twiddles[fstride * 2 * m];
tw = &st->twiddles[0];
for (int i = 0; i < N; i++) {
Fout = Fout_beg + i * mm;
std::complex<float>* Fout0 = Fout;
std::complex<float>* Fout1 = Fout0 + m;
std::complex<float>* Fout2 = Fout0 + 2 * m;
std::complex<float>* Fout3 = Fout0 + 3 * m;
std::complex<float>* Fout4 = Fout0 + 4 * m;
// For non-custom modes, m is guaranteed to be a multiple of 4.
for (int u = 0; u < m; ++u) {
scratch[0] = *Fout0;
scratch[1] = *Fout1 * tw[u * fstride];
scratch[2] = *Fout2 * tw[2 * u * fstride];
scratch[3] = *Fout3 * tw[3 * u * fstride];
scratch[4] = *Fout4 * tw[4 * u * fstride];
scratch[7] = scratch[1] + scratch[4];
scratch[10] = scratch[1] - scratch[4];
scratch[8] = scratch[2] + scratch[3];
scratch[9] = scratch[2] - scratch[3];
Fout0->real(Fout0->real() + scratch[7].real() + scratch[8].real());
Fout0->imag(Fout0->imag() + scratch[7].imag() + scratch[8].imag());
scratch[5].real(scratch[0].real() + scratch[7].real() * ya.real() +
scratch[8].real() * yb.real());
scratch[5].imag(scratch[0].imag() + scratch[7].imag() * ya.real() +
scratch[8].imag() * yb.real());
scratch[6].real(scratch[10].imag() * ya.imag() +
scratch[9].imag() * yb.imag());
scratch[6].imag(
-(scratch[10].real() * ya.imag() + scratch[9].real() * yb.imag()));
*Fout1 = scratch[5] - scratch[6];
*Fout4 = scratch[5] + scratch[6];
scratch[11].real(scratch[0].real() + scratch[7].real() * yb.real() +
scratch[8].real() * ya.real());
scratch[11].imag(scratch[0].imag() + scratch[7].imag() * yb.real() +
scratch[8].imag() * ya.real());
scratch[12].real(scratch[9].imag() * ya.imag() -
scratch[10].imag() * yb.imag());
scratch[12].imag(scratch[10].real() * yb.imag() -
scratch[9].real() * ya.imag());
*Fout2 = scratch[11] + scratch[12];
*Fout3 = scratch[11] - scratch[12];
++Fout0;
++Fout1;
++Fout2;
++Fout3;
++Fout4;
}
}
}
void compute_bitrev_table(int base_index,
const size_t stride,
const int16_t* factors,
const KissFft::KissFftState* st,
const int16_t* bitrev_table_last,
int16_t* bitrev_table) {
const int p = *factors++; // The radix.
const int m = *factors++; // Stage's fft length/p.
if (m == 1) {
for (int j = 0; j < p; j++) {
assert(bitrev_table <= bitrev_table_last);
*bitrev_table = base_index + j;
bitrev_table += stride;
}
} else {
for (int j = 0; j < p; j++) {
compute_bitrev_table(base_index, stride * p, factors, st,
bitrev_table_last, bitrev_table);
bitrev_table += stride;
base_index += m;
}
}
}
// Populates |facbuf| with p1, m1, p2, m2, ... where p[i] * m[i] = m[i-1] and
// m0 = n.
bool kf_factor(int n, int16_t* facbuf) {
assert(facbuf);
int p = 4;
int stages = 0;
int nbak = n;
// Factor out powers of 4, powers of 2, then any remaining primes.
do {
while (n % p) {
switch (p) {
case 4:
p = 2;
break;
case 2:
p = 3;
break;
default:
p += 2;
break;
}
if (p > 32000 || p * p > n)
p = n; // No more factors, skip to end.
}
n /= p;
if (p > 5)
return false;
facbuf[2 * stages] = p;
if (p == 2 && stages > 1) {
facbuf[2 * stages] = 4;
facbuf[2] = 2;
}
stages++;
} while (n > 1);
n = nbak;
// Reverse the order to get the radix 4 at the end, so we can use the
// fast degenerate case. It turns out that reversing the order also
// improves the noise behavior.
for (int i = 0; i < stages / 2; i++)
std::swap(facbuf[2 * i], facbuf[2 * (stages - i - 1)]);
for (int i = 0; i < stages; i++) {
n /= facbuf[2 * i];
facbuf[2 * i + 1] = n;
}
return true;
}
void compute_twiddles(const int nfft, std::complex<float>* twiddles) {
constexpr double pi = 3.14159265358979323846264338327;
assert(twiddles);
for (int i = 0; i < nfft; ++i) {
const double phase = (-2 * pi / nfft) * i;
twiddles[i].real(std::cos(phase));
twiddles[i].imag(std::sin(phase));
}
}
void fft_impl(const KissFft::KissFftState* st, std::complex<float>* fout) {
assert(st);
assert(fout);
int m2, m;
int p;
int L;
int fstride[KissFft::kMaxFactors];
fstride[0] = 1;
L = 0;
do {
p = st->factors[2 * L];
m = st->factors[2 * L + 1];
assert(static_cast<size_t>(L + 1) < KissFft::kMaxFactors);
fstride[L + 1] = fstride[L] * p;
L++;
} while (m != 1);
m = st->factors[2 * L - 1];
for (int i = L - 1; i >= 0; i--) {
if (i != 0)
m2 = st->factors[2 * i - 1];
else
m2 = 1;
switch (st->factors[2 * i]) {
case 2:
kf_bfly2(fout, m, fstride[i]);
break;
case 4:
kf_bfly4(fout, fstride[i], st, m, fstride[i], m2);
break;
case 3:
kf_bfly3(fout, fstride[i], st, m, fstride[i], m2);
break;
case 5:
kf_bfly5(fout, fstride[i], st, m, fstride[i], m2);
break;
default:
assert(0);
break;
}
m = m2;
}
}
} // namespace
KissFft::KissFftState::KissFftState(int num_fft_points)
: nfft(num_fft_points), scale(1.f / nfft) {
// Factorize |nfft|.
// TODO(alessiob): Handle kf_factor fails (invalid nfft).
if (!kf_factor(nfft, factors.data()))
assert(0);
// Twiddles.
twiddles.resize(nfft);
compute_twiddles(nfft, twiddles.data());
// Bit-reverse table.
bitrev.resize(nfft);
compute_bitrev_table(0, 1, factors.data(), this, &bitrev.back(),
bitrev.data());
}
KissFft::KissFftState::~KissFftState() = default;
KissFft::KissFft(const int nfft) : state_(nfft) {}
KissFft::~KissFft() = default;
void KissFft::ForwardFft(const size_t in_size,
const std::complex<float>* in,
const size_t out_size,
std::complex<float>* out) {
assert(in);
assert(out);
assert(in != out); // In-place FFT not supported.
assert(state_.nfft == static_cast<int>(in_size));
assert(state_.nfft == static_cast<int>(out_size));
// Bit-reverse the input.
for (int i = 0; i < state_.nfft; i++)
out[state_.bitrev[i]] = state_.scale * in[i];
fft_impl(&state_, out);
}
void KissFft::ReverseFft(const size_t in_size,
const std::complex<float>* in,
const size_t out_size,
std::complex<float>* out) {
assert(in);
assert(out);
assert(in != out); // In-place IFFT not supported.
assert(state_.nfft == static_cast<int>(in_size));
assert(state_.nfft == static_cast<int>(out_size));
// Bit-reverse the input.
for (int i = 0; i < state_.nfft; i++)
out[state_.bitrev[i]] = in[i];
for (int i = 0; i < state_.nfft; i++)
out[i].imag(-out[i].imag());
fft_impl(&state_, out);
for (int i = 0; i < state_.nfft; i++)
out[i].imag(-out[i].imag());
}
} // namespace rnnoise
......@@ -2,6 +2,7 @@
Lots of modifications by Jean-Marc Valin
Copyright (c) 2005-2007, Xiph.Org Foundation
Copyright (c) 2008, Xiph.Org Foundation, CSIRO
Copyright (c) 2018, The WebRTC project authors
All rights reserved.
......@@ -29,182 +30,49 @@
#ifndef THIRD_PARTY_RNNOISE_SRC_KISS_FFT_H_
#define THIRD_PARTY_RNNOISE_SRC_KISS_FFT_H_
#include <math.h>
#include <stdlib.h>
#include "arch.h"
#include <stdlib.h>
#define opus_alloc(x) malloc(x)
#define opus_free(x) free(x)
#ifdef __cplusplus
extern "C" {
#endif
#ifdef USE_SIMD
#include <xmmintrin.h>
#define kiss_fft_scalar __m128
#define KISS_FFT_MALLOC(nbytes) memalign(16, nbytes)
#else
#define KISS_FFT_MALLOC opus_alloc
#endif
#ifdef FIXED_POINT
#include "arch.h"
#define kiss_fft_scalar opus_int32
#define kiss_twiddle_scalar opus_int16
#else
#ifndef kiss_fft_scalar
/* default is float */
#define kiss_fft_scalar float
#define kiss_twiddle_scalar float
#define KF_SUFFIX _celt_single
#endif
#endif
typedef struct {
kiss_fft_scalar r;
kiss_fft_scalar i;
} kiss_fft_cpx;
typedef struct {
kiss_twiddle_scalar r;
kiss_twiddle_scalar i;
} kiss_twiddle_cpx;
#define MAXFACTORS 8
/* e.g. an fft of length 128 has 4 factors
as far as kissfft is concerned
4*4*4*2
*/
typedef struct arch_fft_state {
int is_supported;
void* priv;
} arch_fft_state;
typedef struct kiss_fft_state {
int nfft;
opus_val16 scale;
#ifdef FIXED_POINT
int scale_shift;
#endif
int shift;
opus_int16 factors[2 * MAXFACTORS];
const opus_int16* bitrev;
const kiss_twiddle_cpx* twiddles;
arch_fft_state* arch_fft;
} kiss_fft_state;
// #if defined(HAVE_ARM_NE10)
// #include "arm/fft_arm.h"
// #endif
/*typedef struct kiss_fft_state* kiss_fft_cfg;*/
/**
* opus_fft_alloc
*
* Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
*
* typical usage: kiss_fft_cfg mycfg=opus_fft_alloc(1024,0,NULL,NULL);
*
* The return value from fft_alloc is a cfg buffer used internally
* by the fft routine or NULL.
*
* If lenmem is NULL, then opus_fft_alloc will allocate a cfg buffer using
* malloc. The returned value should be free()d when done to avoid memory leaks.
*
* The state can be placed in a user supplied buffer 'mem':
* If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
* then the function places the cfg in mem and the size used in *lenmem
* and returns mem.
*
* If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
* then the function returns NULL and places the minimum cfg
* buffer size in *lenmem.
* */
kiss_fft_state* opus_fft_alloc_twiddles(int nfft,
void* mem,
size_t* lenmem,
const kiss_fft_state* base,
int arch);
kiss_fft_state* opus_fft_alloc(int nfft, void* mem, size_t* lenmem, int arch);
/**
* opus_fft(cfg,in_out_buf)
*
* Perform an FFT on a complex input buffer.
* for a forward FFT,
* fin should be f[0] , f[1] , ... ,f[nfft-1]
* fout will be F[0] , F[1] , ... ,F[nfft-1]
* Note that each element is complex and can be accessed like
f[k].r and f[k].i
* */
void opus_fft_c(const kiss_fft_state* cfg,
const kiss_fft_cpx* fin,
kiss_fft_cpx* fout);
void opus_ifft_c(const kiss_fft_state* cfg,
const kiss_fft_cpx* fin,
kiss_fft_cpx* fout);
void opus_fft_impl(const kiss_fft_state* st, kiss_fft_cpx* fout);
void opus_ifft_impl(const kiss_fft_state* st, kiss_fft_cpx* fout);
void opus_fft_free(const kiss_fft_state* cfg, int arch);
void opus_fft_free_arch_c(kiss_fft_state* st);
int opus_fft_alloc_arch_c(kiss_fft_state* st);
#if !defined(OVERRIDE_OPUS_FFT)
/* Is run-time CPU detection enabled on this platform? */
#if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10))
extern int (*const OPUS_FFT_ALLOC_ARCH_IMPL[OPUS_ARCHMASK + 1])(
kiss_fft_state* st);
#define opus_fft_alloc_arch(_st, arch) \
((*OPUS_FFT_ALLOC_ARCH_IMPL[(arch)&OPUS_ARCHMASK])(_st))
extern void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK + 1])(
kiss_fft_state* st);
#define opus_fft_free_arch(_st, arch) \
((*OPUS_FFT_FREE_ARCH_IMPL[(arch)&OPUS_ARCHMASK])(_st))
extern void (*const OPUS_FFT[OPUS_ARCHMASK + 1])(const kiss_fft_state* cfg,
const kiss_fft_cpx* fin,
kiss_fft_cpx* fout);
#define opus_fft(_cfg, _fin, _fout, arch) \
((*OPUS_FFT[(arch)&OPUS_ARCHMASK])(_cfg, _fin, _fout))
extern void (*const OPUS_IFFT[OPUS_ARCHMASK + 1])(const kiss_fft_state* cfg,
const kiss_fft_cpx* fin,
kiss_fft_cpx* fout);
#define opus_ifft(_cfg, _fin, _fout, arch) \
((*OPUS_IFFT[(arch)&OPUS_ARCHMASK])(_cfg, _fin, _fout))
#else /* else for if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) */
#define opus_fft_alloc_arch(_st, arch) \
((void)(arch), opus_fft_alloc_arch_c(_st))
#define opus_fft_free_arch(_st, arch) ((void)(arch), opus_fft_free_arch_c(_st))
#define opus_fft(_cfg, _fin, _fout, arch) \
((void)(arch), opus_fft_c(_cfg, _fin, _fout))
#define opus_ifft(_cfg, _fin, _fout, arch) \
((void)(arch), opus_ifft_c(_cfg, _fin, _fout))
#endif /* end if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) */
#endif /* end if !defined(OVERRIDE_OPUS_FFT) */
#ifdef __cplusplus
}
#endif
#include <array>
#include <complex>
#include <vector>
namespace rnnoise {
class KissFft {
public:
// Example: an FFT of length 128 has 4 factors as far as kissfft is concerned
// (namely, 4*4*4*2).
static const size_t kMaxFactors = 8;
class KissFftState {
public:
KissFftState(int num_fft_points);
KissFftState(const KissFftState&) = delete;
KissFftState& operator=(const KissFftState&) = delete;
~KissFftState();
const int nfft;
const float scale;
std::array<int16_t, 2 * kMaxFactors> factors;
std::vector<int16_t> bitrev;
std::vector<std::complex<float>> twiddles;
};
explicit KissFft(const int nfft);
KissFft(const KissFft&) = delete;
KissFft& operator=(const KissFft&) = delete;
~KissFft();
void ForwardFft(const size_t in_size,
const std::complex<float>* in,
const size_t out_size,
std::complex<float>* out);
void ReverseFft(const size_t in_size,
const std::complex<float>* in,
const size_t out_size,
std::complex<float>* out);
private:
KissFftState state_;
};
} // namespace rnnoise
#endif // THIRD_PARTY_RNNOISE_SRC_KISS_FFT_H_
/* Copyright (c) 2008-2011 Octasic Inc.
2012-2017 Jean-Marc Valin */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <math.h>
#include "opus_types.h"
#include "common.h"
#include "arch.h"
#include "tansig_table.h"
#include "rnn.h"
#include "rnn_data.h"
#include <stdio.h>
static OPUS_INLINE float tansig_approx(float x)
{
int i;
float y, dy;
float sign=1;
/* Tests are reversed to catch NaNs */
if (!(x<8))
return 1;
if (!(x>-8))
return -1;
#ifndef FIXED_POINT
/* Another check in case of -ffast-math */
if (celt_isnan(x))
return 0;
#endif
if (x<0)
{
x=-x;
sign=-1;
}
i = (int)floor(.5f+25*x);
x -= .04f*i;
y = tansig_table[i];
dy = 1-y*y;
y = y + x*dy*(1 - y*x);
return sign*y;
}
static OPUS_INLINE float sigmoid_approx(float x)
{
return .5 + .5*tansig_approx(.5*x);
}
static OPUS_INLINE float relu(float x)
{
return x < 0 ? 0 : x;
}
void compute_dense(const DenseLayer *layer, float *output, const float *input)
{
int i, j;
int N, M;
int stride;
M = layer->nb_inputs;
N = layer->nb_neurons;
stride = N;
for (i=0;i<N;i++)
{
/* Compute update gate. */
float sum = layer->bias[i];
for (j=0;j<M;j++)
sum += layer->input_weights[j*stride + i]*input[j];
output[i] = WEIGHTS_SCALE*sum;
}
if (layer->activation == ACTIVATION_SIGMOID) {
for (i=0;i<N;i++)
output[i] = sigmoid_approx(output[i]);
} else if (layer->activation == ACTIVATION_TANH) {
for (i=0;i<N;i++)
output[i] = tansig_approx(output[i]);
} else if (layer->activation == ACTIVATION_RELU) {
for (i=0;i<N;i++)
output[i] = relu(output[i]);
} else {
*(int*)0=0;
}
}
void compute_gru(const GRULayer *gru, float *state, const float *input)
{
int i, j;
int N, M;
int stride;
float z[MAX_NEURONS];
float r[MAX_NEURONS];
float h[MAX_NEURONS];
M = gru->nb_inputs;
N = gru->nb_neurons;
stride = 3*N;
for (i=0;i<N;i++)
{
/* Compute update gate. */
float sum = gru->bias[i];
for (j=0;j<M;j++)
sum += gru->input_weights[j*stride + i]*input[j];
for (j=0;j<N;j++)
sum += gru->recurrent_weights[j*stride + i]*state[j];
z[i] = sigmoid_approx(WEIGHTS_SCALE*sum);
}
for (i=0;i<N;i++)
{
/* Compute reset gate. */
float sum = gru->bias[N + i];
for (j=0;j<M;j++)
sum += gru->input_weights[N + j*stride + i]*input[j];
for (j=0;j<N;j++)
sum += gru->recurrent_weights[N + j*stride + i]*state[j];
r[i] = sigmoid_approx(WEIGHTS_SCALE*sum);
}
for (i=0;i<N;i++)
{
/* Compute output. */
float sum = gru->bias[2*N + i];
for (j=0;j<M;j++)
sum += gru->input_weights[2*N + j*stride + i]*input[j];
for (j=0;j<N;j++)
sum += gru->recurrent_weights[2*N + j*stride + i]*state[j]*r[j];
if (gru->activation == ACTIVATION_SIGMOID) sum = sigmoid_approx(WEIGHTS_SCALE*sum);
else if (gru->activation == ACTIVATION_TANH) sum = tansig_approx(WEIGHTS_SCALE*sum);
else if (gru->activation == ACTIVATION_RELU) sum = relu(WEIGHTS_SCALE*sum);
else *(int*)0=0;
h[i] = z[i]*state[i] + (1-z[i])*sum;
}
for (i=0;i<N;i++)
state[i] = h[i];
}
#define INPUT_SIZE 42
void compute_rnn(RNNState *rnn, float *gains, float *vad, const float *input) {
int i;
float dense_out[MAX_NEURONS];
float noise_input[MAX_NEURONS*3];
float denoise_input[MAX_NEURONS*3];
compute_dense(&input_dense, dense_out, input);
compute_gru(&vad_gru, rnn->vad_gru_state, dense_out);
compute_dense(&vad_output, vad, rnn->vad_gru_state);
for (i=0;i<INPUT_DENSE_SIZE;i++) noise_input[i] = dense_out[i];
for (i=0;i<VAD_GRU_SIZE;i++) noise_input[i+INPUT_DENSE_SIZE] = rnn->vad_gru_state[i];
for (i=0;i<INPUT_SIZE;i++) noise_input[i+INPUT_DENSE_SIZE+VAD_GRU_SIZE] = input[i];
compute_gru(&noise_gru, rnn->noise_gru_state, noise_input);
for (i=0;i<VAD_GRU_SIZE;i++) denoise_input[i] = rnn->vad_gru_state[i];
for (i=0;i<NOISE_GRU_SIZE;i++) denoise_input[i+VAD_GRU_SIZE] = rnn->noise_gru_state[i];
for (i=0;i<INPUT_SIZE;i++) denoise_input[i+VAD_GRU_SIZE+NOISE_GRU_SIZE] = input[i];
compute_gru(&denoise_gru, rnn->denoise_gru_state, denoise_input);
compute_dense(&denoise_output, gains, rnn->denoise_gru_state);
}
/* Copyright (c) 2008-2011 Octasic Inc.
2012-2017 Jean-Marc Valin */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef THIRD_PARTY_RNNOISE_SRC_RNN_ACTIVATIONS_H_
#define THIRD_PARTY_RNNOISE_SRC_RNN_ACTIVATIONS_H_
#include <cmath>
namespace rnnoise {
inline float TansigApproximated(float x) {
static constexpr float kTansigTable[201] = {
0.000000f, 0.039979f, 0.079830f, 0.119427f, 0.158649f, 0.197375f,
0.235496f, 0.272905f, 0.309507f, 0.345214f, 0.379949f, 0.413644f,
0.446244f, 0.477700f, 0.507977f, 0.537050f, 0.564900f, 0.591519f,
0.616909f, 0.641077f, 0.664037f, 0.685809f, 0.706419f, 0.725897f,
0.744277f, 0.761594f, 0.777888f, 0.793199f, 0.807569f, 0.821040f,
0.833655f, 0.845456f, 0.856485f, 0.866784f, 0.876393f, 0.885352f,
0.893698f, 0.901468f, 0.908698f, 0.915420f, 0.921669f, 0.927473f,
0.932862f, 0.937863f, 0.942503f, 0.946806f, 0.950795f, 0.954492f,
0.957917f, 0.961090f, 0.964028f, 0.966747f, 0.969265f, 0.971594f,
0.973749f, 0.975743f, 0.977587f, 0.979293f, 0.980869f, 0.982327f,
0.983675f, 0.984921f, 0.986072f, 0.987136f, 0.988119f, 0.989027f,
0.989867f, 0.990642f, 0.991359f, 0.992020f, 0.992631f, 0.993196f,
0.993718f, 0.994199f, 0.994644f, 0.995055f, 0.995434f, 0.995784f,
0.996108f, 0.996407f, 0.996682f, 0.996937f, 0.997172f, 0.997389f,
0.997590f, 0.997775f, 0.997946f, 0.998104f, 0.998249f, 0.998384f,
0.998508f, 0.998623f, 0.998728f, 0.998826f, 0.998916f, 0.999000f,
0.999076f, 0.999147f, 0.999213f, 0.999273f, 0.999329f, 0.999381f,
0.999428f, 0.999472f, 0.999513f, 0.999550f, 0.999585f, 0.999617f,
0.999646f, 0.999673f, 0.999699f, 0.999722f, 0.999743f, 0.999763f,
0.999781f, 0.999798f, 0.999813f, 0.999828f, 0.999841f, 0.999853f,
0.999865f, 0.999875f, 0.999885f, 0.999893f, 0.999902f, 0.999909f,
0.999916f, 0.999923f, 0.999929f, 0.999934f, 0.999939f, 0.999944f,
0.999948f, 0.999952f, 0.999956f, 0.999959f, 0.999962f, 0.999965f,
0.999968f, 0.999970f, 0.999973f, 0.999975f, 0.999977f, 0.999978f,
0.999980f, 0.999982f, 0.999983f, 0.999984f, 0.999986f, 0.999987f,
0.999988f, 0.999989f, 0.999990f, 0.999990f, 0.999991f, 0.999992f,
0.999992f, 0.999993f, 0.999994f, 0.999994f, 0.999994f, 0.999995f,
0.999995f, 0.999996f, 0.999996f, 0.999996f, 0.999997f, 0.999997f,
0.999997f, 0.999997f, 0.999997f, 0.999998f, 0.999998f, 0.999998f,
0.999998f, 0.999998f, 0.999998f, 0.999999f, 0.999999f, 0.999999f,
0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f,
0.999999f, 0.999999f, 0.999999f, 0.999999f, 1.000000f, 1.000000f,
1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
1.000000f, 1.000000f, 1.000000f,
};
// Tests are reversed to catch NaNs.
if (!(x < 8.f))
return 1.f;
if (!(x > -8.f))
return -1.f;
float sign = 1.f;
if (x < 0.f) {
x = -x;
sign = -1.f;
}
// Look-up.
int i = static_cast<int>(std::floor(0.5f + 25 * x));
float y = kTansigTable[i];
// Map i back to x's scale (undo 25 factor).
x -= 0.04f * i;
y = y + x * (1.f - y * y) * (1.f - y * x);
return sign * y;
}
inline float SigmoidApproximated(const float x) {
return 0.5f + 0.5f * TansigApproximated(0.5f * x);
}
inline float RectifiedLinearUnit(const float x) {
return x < 0.f ? 0.f : x;
}
} // namespace rnnoise
#endif // THIRD_PARTY_RNNOISE_SRC_RNN_ACTIVATIONS_H_
This source diff could not be displayed because it is too large. You can view the blob instead.
#include "third_party/rnnoise/rnn_vad_weights.h"
namespace rnnoise {
const int8_t kInputDenseWeights[1008] = {
-10, 0, -3, 1, -8, -6, 3, -13, 1, 0, -3, -7,
-5, -3, 6, -1, -6, 0, -6, -4, -1, -2, 1, 1,
-7, 2, 21, 10, -5, -20, 24, 23, 37, 8, -2, 33,
-6, 22, 13, -2, 50, 8, 13, 1, -15, 30, -10, 30,
0, 3, 5, 27, 1, 4, -3, 41, 56, 35, -2, 49,
-13, 11, 13, -2, -47, 5, -16, -60, -15, 77, -17, 26,
-3, 14, -21, 19, -5, -19, -13, 0, 10, 14, 9, 31,
-13, -41, -10, 4, 22, 18, -48, -6, -10, 62, -3, -18,
-14, 12, 26, -28, 3, 14, 25, -13, -19, 6, 5, 36,
-3, -65, -12, 0, 31, -7, -9, 101, -4, 26, 16, 17,
-12, -12, 14, -36, -3, 5, -15, 21, 2, 30, -3, 38,
-4, 1, -6, 7, -7, 14, 38, -22, -30, -3, -7, 3,
-39, -70, -126, 25, 34, 94, -67, -22, -33, 83, -47, -118,
4, 70, 33, 25, 62, -128, -76, -118, -113, 49, -12, -100,
-18, -114, -33, 43, 32, 61, 40, -9, -106, 2, 36, -100,
-40, -5, 20, -75, 61, -51, -9, 126, -27, -52, 5, -24,
-21, -126, -114, -12, 15, 106, -2, 73, -125, 50, 13, -120,
35, 35, 4, -61, 29, -124, 6, -53, -69, -125, 64, -89,
36, -107, -103, -7, 27, 121, 69, 77, -35, 35, 95, -125,
-49, 97, -45, -43, -23, 23, -28, -65, -118, 2, 8, -126,
27, -97, 92, 5, 55, 82, 17, -57, -115, 37, 8, -106,
-46, 41, -2, 21, -44, 8, -73, -58, -39, 34, 89, -95,
95, -117, 120, -58, 31, 123, 1, -32, -109, -110, 60, -120,
-43, -74, 5, 91, 26, 21, 114, 82, -83, -126, 123, 22,
-16, -67, 25, -83, 46, 48, -34, -121, -124, -63, -35, -9,
31, 82, 123, 6, -3, 117, 93, -2, -13, -36, 124, -112,
-6, -102, -5, -33, -15, 44, -69, -127, -23, -40, -34, -85,
68, 83, -1, 40, 8, 84, 118, -58, -55, -102, 123, -55,
-14, -123, 44, -63, -14, 21, 35, 16, 24, -126, -13, -114,
35, 20, -36, 61, -9, 97, 34, 19, -32, -109, 76, -104,
99, -119, 45, -125, -51, -28, -8, -69, -8, 125, -45, -93,
113, 103, -41, -82, 52, 7, 126, 0, -40, 104, 55, -58,
17, -124, -93, -58, 8, -45, 1, 56, -123, 108, -47, -23,
115, 127, 17, -68, -13, 116, -82, -44, 45, 67, -120, -101,
-15, -125, 120, -113, 17, -48, -73, 126, -64, -86, -118, -19,
112, -1, -66, -27, -62, 121, -86, -58, 50, 89, -38, -75,
95, -111, 12, -113, 2, -68, 2, -94, -121, 91, -5, 0,
79, 43, -7, -18, 79, 35, -38, 47, 1, -45, 83, -50,
102, 32, 55, -96, 15, -122, -69, 45, -27, 91, -62, -30,
46, -95, 22, -72, -97, -1, 14, -122, 28, 127, 61, -126,
121, 9, 68, -120, 49, -60, 90, 3, 43, 68, 54, 34,
-10, 28, 21, -24, -54, 22, -113, -12, 82, -2, -17, -9,
127, 8, 116, -92, 0, -70, -33, 123, 66, 116, -74, -4,
74, -72, -22, -47, 1, -83, -60, -124, 1, 122, -57, -43,
49, 40, -126, -128, -8, -29, 28, -24, -123, -121, -70, -93,
-37, -126, 11, -125, -37, 11, -31, -51, -124, 116, -128, 8,
-25, 109, 75, -12, 7, 8, 10, 117, 124, -128, -128, 29,
-26, 101, 21, -128, 87, 8, -39, 23, -128, 127, -127, 74,
-55, 74, 112, 127, 4, 55, 44, -92, 123, 34, -93, 47,
-21, -92, 17, 49, -121, 92, 7, -126, -125, 124, -74, 3,
-59, 18, -91, 3, -9, 9, 56, 116, 7, -29, 33, 87,
-21, -128, -13, 57, 74, 9, -29, -61, -97, -21, -95, -12,
-114, 16, 82, 125, -7, 10, -24, 9, 77, -128, -102, -25,
3, -126, 10, 13, -18, 51, 26, 127, -79, 35, 51, 12,
-50, -24, 1, -7, 22, 81, 65, 120, -30, -38, 85, 122,
-4, -106, -11, 27, 53, 41, 8, -104, -66, -38, -124, 10,
12, 76, 117, -109, 9, 11, 2, -18, 3, 113, -16, -79,
-39, -123, -20, -128, 2, 13, -33, -58, 10, 84, -104, 13,
64, 109, 1, 54, -12, 28, 24, 63, -126, 118, -82, 46,
-12, -15, 14, -43, 60, 22, -32, -19, -46, 91, -107, 24,
-94, 26, -47, 125, 6, 58, -15, -75, -26, -38, -35, 103,
-16, -17, -13, 63, -2, 45, -45, -73, -23, 70, -87, 51,
-17, 53, 76, 14, -18, -31, -14, 103, 8, 21, -28, -33,
-20, -47, 6, 39, 40, -30, 7, -76, 55, 31, -20, -21,
-59, 1, 25, -11, 17, 5, -13, -39, 0, -76, 50, -33,
-29, -50, -16, -11, -12, -1, -46, 40, -10, 65, -19, 21,
-41, -32, -83, -19, -4, 49, -60, 118, -24, -46, 9, 102,
-20, 8, -19, 25, 31, -3, -37, 0, 25, 7, 29, 2,
-39, 127, -64, -20, 64, 115, -30, 36, 100, 35, 122, 127,
127, -127, 127, -127, 19, 127, -89, -79, -32, 39, -127, 125,
-80, 126, -127, 26, 8, 98, -8, -57, -90, -50, 126, 61,
127, -126, 40, -106, -68, 104, -125, -119, 11, 10, -127, 66,
-56, -12, -126, -104, 27, 75, 38, -124, -126, -125, 84, -123,
-45, -114, -128, 127, 103, -101, -124, 127, -11, -23, -123, 92,
-123, 24, 126, 41, -2, -39, -27, -94, 40, -112, -48, 127,
58, 14, 38, -75, -64, 73, 117, 100, -119, -11, 6, 32,
-126, -14, 35, 121, -10, 54, -60, 89, -3, 69, -25, -20,
43, -86, -34, 24, 27, 7, -81, -99, -23, -16, -26, 13,
35, -97, 80, -29, -13, -121, -12, -65, -94, 70, -89, -126,
-95, 88, 33, 96, 29, -90, 69, 114, -78, 65, 90, -47,
-47, 89, 1, -12, 3, 8, 30, 5, 2, -30, -1, 6,
-7, 10, -4, 46, -27, -40, 22, -6, -17, 45, 24, -9,
23, -14, -63, -26, -12, -57, 27, 25, 55, -76, -47, 21,
34, 33, 26, 17, 14, 6, 9, 26, 25, -25, -25, -18};
const int8_t kInputDenseBias[24] = {38, -6, 127, 127, 127, -43, -127, 78,
127, 5, 127, 123, 127, 127, -128, -76,
-126, 28, 127, 125, -30, 127, -89, -20};
const int8_t kHiddenGruWeights[1728] = {
-124, 23, -123, -33, -95, -4, 8, -84, 4, 101, -119, 116,
-4, 123, 103, -51, 29, -124, -114, -49, 31, 9, 75, -128,
0, -49, 37, -50, 46, -21, -63, -104, 54, 82, 33, 21,
70, 127, -9, -79, -39, -23, -127, 107, 122, -96, -46, -18,
-39, 13, -28, -48, 14, 56, -52, 49, -1, -121, 25, -18,
-36, -52, -57, -30, 54, -124, -26, -47, 10, 39, 12, 2,
9, -127, -128, 102, 21, 11, -64, -71, 89, -113, -111, 54,
31, 94, 121, -40, 30, 40, -109, 73, -9, 108, -92, 2,
-127, 116, 127, 127, -122, 95, 127, -37, -127, 28, 89, 10,
24, -104, -62, -67, -14, 38, 14, -71, 22, -41, 20, -50,
39, 63, 86, 127, -18, 79, 4, -51, 2, 33, 117, -113,
-78, 56, -91, 37, 34, -45, -44, -22, 21, -16, 56, 30,
-84, -79, 38, -74, 127, 9, -25, 2, 82, 61, 25, -26,
26, 11, 117, -65, 12, -58, 42, -62, -93, 11, 11, 124,
-123, 80, -125, 11, -90, 42, 94, 4, -109, -1, 85, -52,
45, -26, -27, 77, -5, 30, 90, 0, 95, -7, 53, 29,
-82, 22, -9, 74, 2, -12, -73, 114, 97, -64, 122, -77,
43, 91, 86, 126, 106, 72, 90, -43, 46, 96, -51, 21,
22, 68, 22, 41, 79, 75, -46, -105, 23, -116, 127, -123,
102, 57, 85, 10, -29, 34, 125, 126, 124, 81, -15, 54,
96, -128, 39, -124, 103, 74, 126, 127, -50, -71, -122, -64,
93, -75, 71, 105, 122, 123, 126, 122, -127, 33, -63, -74,
124, -71, 33, 41, -56, 19, 6, 65, 41, 90, -116, -3,
-46, 75, -13, 98, -74, -42, 74, -95, -96, 81, 24, 32,
-19, -123, 74, 55, 109, 115, 0, 32, 33, 12, -20, 9,
127, 127, -61, 79, -48, -54, -49, 101, -9, 27, -106, 74,
119, 77, 87, -126, -24, 127, 124, 31, 34, 127, 40, 3,
-90, 127, 23, 57, -53, 127, -69, -88, -33, 127, 19, -46,
-9, -125, 13, -126, -113, 127, -41, 46, 106, -62, 3, -10,
111, 49, -34, -24, -20, -112, 11, 101, -50, -34, 50, 65,
-64, -106, 70, -48, 60, 9, -122, -45, 15, -112, -26, -4,
1, 39, 23, 58, -45, -80, 127, 82, 58, 30, -94, -119,
51, -89, 95, -107, 30, 127, 125, 58, -52, -42, -38, -20,
-122, 115, 39, -26, 5, 73, 13, -39, 43, -23, -20, -125,
23, 35, 53, -61, -66, 72, -20, 33, 8, 35, 4, 7,
18, 19, 16, -45, -50, -71, 31, -29, -41, -27, 10, 14,
27, 9, -23, 98, 6, -94, 92, 127, -114, 59, -26, -100,
-62, -127, -17, -85, -60, 126, -42, -6, 33, -120, -26, -126,
-127, -35, -114, -31, 25, -126, -100, -126, -64, -46, -31, 30,
25, -74, -111, -97, -81, -104, -114, -19, -9, -116, -69, 22,
30, 59, 8, -51, 16, -97, 18, -4, -89, 80, -50, 3,
36, -67, 56, 69, -26, 107, -10, 58, -28, -4, -57, -72,
-111, 0, -75, -119, 14, -75, -49, -66, -49, 8, -121, 22,
-54, 121, 30, 54, -26, -126, -123, 56, 5, 48, 21, -127,
-11, 23, 25, -82, 6, -25, 119, 78, 4, -104, 27, 61,
-48, 37, -13, -52, 50, -50, 44, -1, -22, -43, -59, -78,
-67, -32, -26, 9, -3, 40, 16, 19, 3, -9, 20, -6,
-37, 28, 39, 17, -19, -10, 1, 6, -59, 74, 47, 3,
-119, 0, -128, -107, -25, -22, -69, -23, -111, -42, -93, -120,
90, -85, -54, -118, 76, -79, 124, 101, -77, -75, -17, -71,
-114, 68, 55, 79, -1, -123, -20, 127, -65, -123, -128, -87,
123, 9, -115, -14, 7, -4, 127, -79, -115, 125, -28, 89,
-83, 49, 89, 119, -69, -5, 12, -49, 60, 57, -24, -99,
-110, 76, -83, 125, 73, 81, 11, 8, -45, 1, 83, 13,
-70, -2, 97, 112, -97, 53, -9, -94, 124, 44, -49, -24,
52, 76, -110, -70, -114, -12, 72, -4, -114, 43, -43, 81,
102, -84, -27, 62, -40, 52, 58, 124, -35, -51, -123, -43,
56, -75, -34, -35, -106, 93, -43, 14, -16, 46, 62, -97,
21, 30, -53, 21, -11, -33, -20, -95, 4, -126, 12, 45,
20, 108, 85, 11, 20, -40, 99, 4, -25, -18, -23, -12,
-126, -55, -20, -44, -51, 91, -127, 127, -44, 7, 127, 78,
38, 125, -6, -94, -103, 73, 126, -126, 18, 59, -46, 106,
76, 116, -31, 75, -4, 92, 102, 32, -31, 73, 42, -21,
-28, 57, 127, -8, -107, 115, 124, -94, -4, -128, 29, -57,
70, -82, 50, -13, -44, 38, 67, -93, 6, -39, -46, 56,
68, 27, 61, 26, 18, -72, 127, 22, 18, -31, 127, 61,
-65, -38, 1, -67, -1, 8, -73, 46, -116, -94, 58, -49,
71, -40, -63, -82, -20, -60, 93, 76, 69, -106, 34, -31,
4, -25, 107, -18, 45, 4, -61, 126, 54, -126, -125, 41,
19, 44, 32, -98, 125, -24, 125, -96, -125, 15, 87, -4,
-90, 18, -40, 28, -69, 67, 22, 41, 39, 7, -48, -44,
12, 69, -13, 2, 44, -38, 111, -7, -126, -22, -9, 74,
-128, -36, -7, -123, -15, -79, -91, -37, -127, -122, 104, 30,
7, 98, -37, 111, -116, -47, 127, -45, 118, -111, -123, -120,
-77, -64, -125, 124, 77, 111, 77, 18, -113, 117, -9, 67,
-77, 126, 49, -20, -124, 39, 41, -124, -34, 114, -87, -126,
98, -20, 59, -17, -24, 125, 107, 54, 35, 33, -44, 12,
-29, 125, -71, -28, -63, -114, 28, -17, 121, -36, 127, 89,
-122, -49, -18, -48, 17, 24, 19, -64, -128, 13, 86, 45,
13, -49, 55, 84, 48, 80, -39, 99, -127, 70, -33, 30,
50, 126, -65, -117, -13, -20, -24, 127, 115, -72, -104, 63,
126, -42, 57, 17, 46, 21, 119, 110, -100, -60, -112, 62,
-33, 28, 26, -22, -60, -33, -54, 78, 25, 32, -114, 86,
44, 26, 43, 76, 121, 19, 97, -2, -3, -73, -68, 6,
-116, 6, -43, -97, 46, -128, -120, -31, -119, -29, 16, 16,
-126, -128, -126, -46, -9, -3, 92, -31, -76, -126, -3, -107,
-12, -23, -69, 5, 51, 27, -42, 23, -70, -128, -29, 22,
29, -126, -55, 50, -71, -3, 127, 44, -27, -70, -63, -66,
-70, 104, 86, 115, 29, -92, 41, -90, 44, -11, -28, 20,
-11, -63, -16, 43, 31, 17, -73, -31, -1, -17, -11, -39,
56, 18, 124, 72, -14, 28, 69, -121, -125, 34, 127, 63,
86, -80, -126, -125, -124, -47, 124, 77, 124, -19, 23, -7,
-50, 96, -128, -93, 102, -53, -36, -87, 119, -125, 92, -126,
118, 102, 72, -2, 125, 10, 97, 124, -125, 125, 71, -20,
-47, -116, -121, -4, -9, -32, 79, -124, -36, 33, -128, -74,
125, 23, 127, -29, -115, -32, 124, -89, 32, -107, 43, -17,
24, 24, 18, 29, -13, -15, -36, 62, -91, 4, -41, 95,
28, -23, 6, 46, 84, 66, 77, 68, -70, -1, -23, -6,
65, 70, -21, 9, 77, -12, 2, -118, 4, 9, -108, 84,
52, 2, 52, 13, -10, 58, -110, 18, 66, -95, -23, 70,
31, -3, 56, 56, -3, -7, 1, -27, -48, -61, 41, -4,
10, -62, 32, -7, -24, 9, -48, -60, -4, 79, -20, -38,
-76, 68, -49, -97, 0, -15, 5, -100, -49, -95, -99, -115,
-9, -40, 10, 104, 13, 56, 127, -27, -109, -94, -118, -102,
-44, -85, 52, 127, -4, 14, 62, 121, -122, -26, -79, -42,
-34, 1, 25, -38, -79, -58, -31, -31, -90, -30, -123, 32,
-56, 125, 66, 124, -1, 3, 91, -103, -7, 23, 78, -18,
9, 69, -69, 76, -38, -33, -2, -98, 18, 106, 84, 55,
87, -47, 35, -124, 64, 41, -14, 46, 25, -2, 120, -21,
82, 19, -79, -37, -3, -8, -16, 21, 19, -5, -28, -112,
39, -6, -30, 53, -69, 53, 46, 127, 123, 78, 20, 28,
-7, 73, 72, 17, -40, 41, 111, 57, 32, -95, 29, 28,
-39, -65, 54, -20, -63, 29, -67, 3, 44, -57, -47, 11,
61, -22, -44, 61, 48, -100, 20, 125, 96, -24, -16, 3,
-69, -126, 74, -125, 9, 45, -67, -123, -59, -72, 118, 69,
45, 50, -57, 67, 13, -66, -106, 47, 62, 22, -1, -22,
-25, -40, -125, 3, 125, 32, 102, -56, -25, -75, -30, 122,
60, -13, 36, -73, 7, -84, 124, 40, -118, 17, -87, -118,
-8, 3, -27, 111, -40, 40, -51, 127, 125, -45, -30, -54,
46, 80, -1, -30, 101, -17, 18, 26, 54, 7, -12, 1,
-127, 123, -122, -27, -75, 64, 10, 25, -15, -44, 127, -127,
5, -84, -81, -7, 19, -26, 126, 15, 116, -126, 14, -76,
44, 62, -110, -124, 125, -29, -87, -3, -69, 82, 90, 57,
-123, 123, 100, -19, -51, -32, 69, 37, -57, -128, -124, -72,
-13, 51, -7, -45, -73, 5, 99, -26, -117, -96, -109, 4,
-31, -12, 0, 31, -42, -27, 12, -81, 118, 39, 83, 14,
41, -126, 107, -82, 94, -116, -122, -47, -109, -84, -128, -35,
-56, 66, 8, -65, 19, 42, -46, -72, -109, 41, 43, -127,
-113, 58, 127, 42, -75, -1, 65, 117, -55, -113, -123, 124,
43, -96, -115, -19, 68, 15, 94, 3, 75, 0, 34, 9,
42, 110, -48, 92, -76, 99, -17, 27, 32, 13, 125, 50,
-17, 56, 4, 53, 34, -8, 99, 80, -126, -21, -65, -11,
-46, 44, -81, -3, -121, 123, 66, -81, -84, 119, 127, 84,
105, 45, -66, -42, -23, 32, -25, 12, 111, 127, 88, 125,
30, 24, -127, -9, -54, 127, -116, -119, 88, 70, 94, -120,
35, -93, 15, 22, -21, 25, -110, -123, -45, 8, -109, 125,
-122, -86, -126, 8, -14, -120, -45, -45, 69, -125, -122, 6,
81, 86, 125, 95, 54, 77, 54, -123, 126, -85, -117, 56,
11, 0, -61, -91, -12, -2, -113, -3, -15, -122, -63, -91,
10, 84, -111, 125, 93, 21, 62, -78, -116, 13, -57, 28,
-124, 126, 110, 12, 15, 95, 15, -19, -125, -97, 52, -7,
101, 9, 20, -125, -26, -56, 72, 77, 12, -126, 22, -29,
47, 62, 95, 112, 69, 32, 97, -83, -8, -5, 67, -63,
-123, 79, 59, 0, -6, -17, 4, -111, -52, 27, 65, 0};
const int8_t kHiddenGruRecurrentWeights[1728] = {
65, 83, 35, 56, 24, -34, -28, -2, 125, 19, 42, -9,
124, -53, 24, -87, 11, 35, -81, -35, -125, -31, 123, -21,
33, -91, 113, -93, 45, -6, 53, 38, -92, 8, -27, 87,
4, 43, 43, 10, -128, -128, -46, 127, -38, -45, 25, -87,
19, 5, 52, -96, -23, -29, 121, -126, -24, -20, -2, 69,
-50, 6, 71, -81, -125, 90, -94, 1, -38, 36, 89, 17,
-60, 71, -48, 18, -15, 44, -18, 59, 11, 114, -51, 32,
110, 1, 4, 109, -24, 127, 27, 60, 88, 24, 45, -59,
75, -36, 8, 57, -32, -25, 13, 126, -89, -61, -76, 127,
18, -62, -68, 23, -113, 5, 126, 43, -88, 26, -78, 18,
75, 21, 9, -74, 20, 41, 126, -118, -15, 9, 116, 126,
-127, 34, -6, 126, -128, -53, -54, -55, -121, 70, 127, -12,
-68, 82, -25, 104, -126, 126, -21, -26, 124, -75, -127, -120,
13, 61, -64, -108, -63, -65, -44, -35, -61, -39, 109, -74,
113, -3, 108, -30, 125, 120, 39, 125, -128, -95, -99, 111,
9, 25, 114, -75, -92, -54, -12, -32, -38, 10, 31, 10,
63, 51, 40, -99, 74, 4, 50, -128, -36, -35, -11, -28,
-126, -7, 66, -58, -126, -22, -83, -61, -127, 49, 126, -8,
7, 62, 36, -11, -32, -44, 63, 116, 41, 65, -127, 126,
63, -30, -96, 74, -92, 127, 38, -18, -128, 68, -5, 101,
-4, 85, 58, 79, 0, -58, 8, 119, -70, -1, -79, -68,
114, -28, -90, -6, -112, 2, 127, -8, 10, 55, -59, -126,
127, 125, 80, 72, 35, -54, 95, -124, -124, 79, 23, -46,
-61, -127, -100, 99, -77, 8, -87, 5, -2, 49, 85, 7,
-71, 82, 53, -41, 22, -22, -93, -103, 6, 52, -56, 14,
-8, -111, 85, 16, 54, 32, -118, -24, 61, -53, 96, -70,
-5, -17, -67, -84, -7, -82, -107, -96, 21, -83, -58, 50,
12, -126, -1, -28, 34, -126, 115, 17, 91, 1, -127, 72,
11, 126, -81, 6, 96, -8, 77, 15, -6, 63, -27, 20,
-123, -109, 85, -79, -17, 126, -92, 2, -61, 20, 14, 17,
121, 123, 30, 57, 120, 127, 57, 42, 117, 98, 67, 39,
-20, -70, 100, 7, 125, 122, 40, 16, -79, 125, 83, 41,
-106, -57, 24, 55, 27, -66, -111, -44, -7, -43, -66, 121,
42, -128, -45, 35, 15, -127, 34, -35, -34, -40, -18, -6,
63, 111, 31, 116, 127, 19, 24, -71, -39, 34, 11, 19,
-40, 27, 12, 106, -10, 56, -82, -106, -2, -50, -52, 114,
-126, -34, -43, -68, 10, 76, 57, -118, -128, 37, -104, 76,
125, 3, -76, 127, -29, 84, -94, -15, 55, 125, 79, 127,
-57, -125, 104, -68, 126, 126, -77, 51, 45, 33, -109, 115,
-11, 1, 95, -121, -5, -9, -126, -114, 39, 68, -126, -107,
-51, -42, 24, -8, 51, -27, -43, 66, -45, 62, -98, -109,
69, 67, 0, -125, -128, 49, 31, 126, -122, 2, -55, -67,
-126, -70, -128, -125, -77, 25, 16, -8, -102, 11, -75, 82,
38, -5, 5, 19, 34, 47, -127, -93, 21, 24, -97, -18,
31, 39, 34, -20, 22, 123, 7, -77, -81, -46, -9, 1,
23, 39, -127, -43, -8, -50, 10, -21, 59, -9, -4, -13,
-27, 44, 127, 52, -47, 70, -43, 52, 101, -49, 27, 45,
49, 33, -125, 55, 114, 20, -1, 76, -24, -96, 105, 24,
126, 75, -21, -105, 13, -42, 40, 126, -30, -39, -95, 125,
-63, 11, 6, 125, 125, -14, 5, 42, -61, -4, 49, 88,
6, -107, -28, 19, -29, 47, 126, 6, -46, -89, -18, 91,
-20, -6, 118, -21, -22, 39, 115, 11, -42, 54, 73, -55,
-77, 62, -27, -59, -99, -12, -127, -40, 56, -3, -124, -91,
71, -111, 6, -19, 82, -24, -35, 102, -42, 7, -126, -126,
-125, 18, 98, -52, 127, 105, -52, 40, -83, 126, -122, 109,
5, 127, 48, 6, 5, -125, 100, -16, 29, 85, -89, 8,
4, 41, 62, -127, 62, 122, 85, 122, -107, 8, -125, 93,
-127, 127, 102, 19, 19, -66, 41, -42, 114, 127, -48, -117,
-29, -6, -73, -102, -3, -19, 0, 88, 42, 87, -117, -20,
2, 122, 28, 63, 71, 66, 120, 93, 124, -43, 49, 103,
31, 90, -91, -22, -126, 26, -24, -21, 51, -126, 87, -103,
-69, -10, -66, -23, 20, 97, 36, 25, -127, 30, -20, -63,
30, 51, -116, 23, 40, -39, 36, -83, -77, -25, -50, 110,
14, 13, -109, 125, -65, -55, -87, 124, -126, -32, -72, -108,
127, 127, -125, -124, 61, 121, 102, -128, -127, 16, 100, 127,
-124, -68, 72, -93, -128, 43, -93, -19, -125, -97, -113, -33,
83, 127, -44, 127, -75, 127, 16, 44, 50, -122, 23, 118,
46, 19, 26, -128, 10, 4, 99, -14, -82, -13, 30, 125,
57, 65, 60, -71, 35, 98, 28, 7, 1, 43, 89, 70,
75, 121, -59, 82, -126, -53, -16, -116, -65, 52, -52, 0,
80, 35, 45, -61, 46, 8, 107, 27, -26, -118, 90, 57,
-10, 7, -15, 0, -39, -4, 12, 29, -1, 116, 84, 79,
119, 125, -59, 28, -6, -25, -43, 2, 90, 79, 67, 103,
-82, 2, -6, 125, 19, 73, 0, -105, 112, -17, 104, 107,
124, 106, 19, 56, -44, 55, -112, 6, -39, -83, 126, -93,
-98, 57, -120, -23, -38, 2, -31, -48, 106, 127, 127, 69,
16, 110, 71, 104, 62, -12, -22, 42, -37, -94, 34, -1,
-32, -12, -124, -47, -13, 60, -75, -66, 58, -127, -2, 64,
76, -106, 73, -49, -31, 127, 126, 31, 16, 127, -110, 107,
-16, -53, 20, 69, -14, -125, 59, -44, 15, 120, 125, 125,
43, 6, 19, -58, 127, 127, 43, 16, 82, 97, -127, 127,
-93, -41, 88, 0, 77, -15, 116, 16, -124, -31, -3, 95,
-40, -126, -54, -126, -83, -8, -59, 6, 67, -29, 4, 124,
-10, 112, -28, -8, 85, -21, 45, 84, 6, -8, 11, 72,
32, 84, -62, 77, 2, -36, 75, 31, -50, 116, 126, 119,
-88, -55, -14, -37, 126, 40, -108, -6, -6, 57, 64, -28,
-76, 30, -117, -93, 31, -92, -44, -64, 94, 58, 65, 114,
41, 47, 71, 42, -26, 99, -126, 57, -5, 74, -19, -113,
-1, 67, -21, 126, 1, -3, 33, 60, -82, 37, -48, 89,
114, -38, 127, -114, 35, 58, -5, 21, -46, 121, -123, -43,
127, 115, 123, 122, -101, 126, 127, 81, 52, 89, -127, 102,
42, 117, -9, -2, 125, 127, 110, 96, 120, 66, 70, 124,
55, 84, -38, -58, 119, -127, -16, -79, 123, 18, -127, -50,
-38, 120, -85, 1, 7, -56, 108, -77, -2, 21, 37, 1,
13, -105, -69, 28, -87, 33, -104, -51, 126, 41, 3, -121,
28, 71, 58, 86, -8, 127, 94, -55, 125, 40, -19, 127,
-33, -87, -23, 7, -111, -68, 9, 84, -119, 55, -82, 78,
-37, -20, -9, -23, 53, -13, 15, -46, 116, 126, -127, 56,
-126, 125, -7, -1, 45, 26, 125, 121, 29, 47, -86, 30,
10, 76, -125, -7, 23, 92, -12, -39, -18, 92, -97, -8,
-85, -41, 49, -50, 123, -37, -126, -30, 14, 79, -49, -65,
9, -36, -38, -96, 85, -24, -13, 37, -25, -5, -64, -127,
55, -60, -18, -61, -63, 127, 56, 67, 15, 124, 72, 120,
127, 40, -10, 114, 24, -23, 46, 78, -53, 125, 86, 124,
86, 0, 38, 93, 21, 127, 123, 75, -72, 13, 48, 33,
83, -51, 15, -32, -49, -33, 120, 64, 7, 9, 65, 60,
21, -21, -61, -53, -113, 84, -97, 101, 37, -114, -27, 41,
73, 126, -10, 59, 61, -15, 70, -13, 82, -4, 69, 56,
94, -91, -50, 92, -74, -48, 53, -7, -107, 127, 28, 30,
-26, -21, -61, 77, 82, 64, -91, -125, 122, -104, 127, 123,
122, 123, 76, -126, 127, -6, -80, 7, 40, -66, -65, 54,
-2, 23, 96, -64, 74, 2, -53, -12, -123, 39, 60, -20,
16, -17, -97, 23, -4, -53, -122, 32, -16, -54, -95, 43,
71, -1, -67, -33, 41, 18, 72, 28, -83, 31, -100, -91,
-27, 10, -128, -106, 2, 76, -13, 42, 34, 112, -19, 44,
40, -9, -11, 65, 92, -43, -125, 2, 47, -32, 25, 122,
-29, 12, 101, -8, -126, -23, 43, 7, 125, -20, -124, 82,
-2, 13, -73, -106, 115, 31, 116, -23, -44, -71, 84, 3,
47, 91, 127, 127, -15, 95, 7, 93, 5, 113, -50, 54,
11, 13, -127, 17, 72, 43, -23, 5, -70, 20, 15, -27,
99, 69, -109, -122, -94, 16, 127, 0, 116, 104, 45, 108,
-34, 87, 72, -14, 118, 46, 42, 109, -26, 95, 93, 127,
60, 127, -93, -54, -122, 34, -105, 56, 55, 103, 125, -71,
-50, 95, -72, 127, 107, 21, 73, 126, 61, 127, 127, 24,
-62, 90, 73, 90, -46, -78, -124, 72, 123, -42, 50, -107,
17, -32, -62, -89, 124, 1, 80, -2, 117, 119, -65, -127,
-95, -121, -52, 103, 66, 75, -3, -62, -127, 127, -74, 124,
79, 49, 40, 105, -67, -71, -70, 43, 127, 119, -4, 66,
43, 23, 91, -126, 15, 63, -119, 112, 103, 15, -99, 31,
-127, 69, 116, -46, -67, 2, -126, -29, 30, 30, -69, -98,
-47, -87, -70, -127, 23, -73, 30, -7, 94, -52, -65, 98,
-45, 97, 53, 23, -9, -22, -52, -47, 6, -1, -85, -15,
-61, -14, 68, 110, -10, -121, -25, -35, -15, -94, -123, 27,
75, 48, -66, -56, -44, 93, 109, 67, -36, 24, 70, -126,
8, -127, 126, 52, 11, -32, 120, -13, -26, -28, -125, 127,
106, -50, 124, 36, -126, -12, 0, -23, 76, -71, -126, -12,
-17, -82, 12, 124, 57, 33, 4, 77, -46, 71, -34, 72,
125, -128, 124, -24, -128, 75, -120, 69, -45, 55, 33, 127,
-33, 4, -105, -41, -59, -91, 123, 44, -127, 127, -67, 52,
25, -125, -65, 100, -25, 123, 6, 11, -123, -92, -33, 126,
-17, -4, 29, 33, 127, 96, 3, 87, -48, -18, -70, 123,
58, -127, -3, -52, -1, -36, -41, 127, 51, -52, -27, 46,
-83, 57, 9, 126, 127, 94, 79, -37, -127, -40, 67, 52,
82, -66, 122, -13, -73, 127, -8, -80, 46, -48, 4, -54};
const int8_t kHiddenGruBias[72] = {
124, 125, -57, -126, 53, 123, 127, -75, 68, 102, -2, 116,
124, 127, 124, 125, 126, 123, -16, 48, 125, 126, 78, 85,
11, 126, -30, -30, -64, -3, -105, -29, -17, 69, 63, 2,
-32, -10, -62, 113, -52, 112, -109, 112, 7, -40, 73, 53,
62, 6, -2, 0, 0, 100, -16, 26, -24, 56, 26, -10,
-33, 41, 70, 109, -29, 127, 34, -66, 49, 53, 27, 62};
const int8_t kOutputWeights[24] = {127, 127, 127, 127, 127, 20, 127, -126,
-126, -54, 14, 125, -126, -126, 127, -125,
-126, 127, -127, -127, -57, -30, 127, 80};
const int8_t kOutputBias[1] = {-50};
} // namespace rnnoise
#ifndef THIRD_PARTY_RNNOISE_SRC_RNN_VAD_WEIGHTS_H_
#define THIRD_PARTY_RNNOISE_SRC_RNN_VAD_WEIGHTS_H_
namespace rnnoise {
extern const int8_t kInputDenseWeights[1008];
extern const int8_t kInputDenseBias[24];
extern const int8_t kHiddenGruWeights[1728];
extern const int8_t kHiddenGruRecurrentWeights[1728];
extern const int8_t kHiddenGruBias[72];
extern const int8_t kOutputWeights[24];
extern const int8_t kOutputBias[1];
} // namespace rnnoise
#endif // THIRD_PARTY_RNNOISE_SRC_RNN_VAD_WEIGHTS_H_
/* This file is auto-generated by gen_tables */
static const float tansig_table[201] = {
0.000000f, 0.039979f, 0.079830f, 0.119427f, 0.158649f,
0.197375f, 0.235496f, 0.272905f, 0.309507f, 0.345214f,
0.379949f, 0.413644f, 0.446244f, 0.477700f, 0.507977f,
0.537050f, 0.564900f, 0.591519f, 0.616909f, 0.641077f,
0.664037f, 0.685809f, 0.706419f, 0.725897f, 0.744277f,
0.761594f, 0.777888f, 0.793199f, 0.807569f, 0.821040f,
0.833655f, 0.845456f, 0.856485f, 0.866784f, 0.876393f,
0.885352f, 0.893698f, 0.901468f, 0.908698f, 0.915420f,
0.921669f, 0.927473f, 0.932862f, 0.937863f, 0.942503f,
0.946806f, 0.950795f, 0.954492f, 0.957917f, 0.961090f,
0.964028f, 0.966747f, 0.969265f, 0.971594f, 0.973749f,
0.975743f, 0.977587f, 0.979293f, 0.980869f, 0.982327f,
0.983675f, 0.984921f, 0.986072f, 0.987136f, 0.988119f,
0.989027f, 0.989867f, 0.990642f, 0.991359f, 0.992020f,
0.992631f, 0.993196f, 0.993718f, 0.994199f, 0.994644f,
0.995055f, 0.995434f, 0.995784f, 0.996108f, 0.996407f,
0.996682f, 0.996937f, 0.997172f, 0.997389f, 0.997590f,
0.997775f, 0.997946f, 0.998104f, 0.998249f, 0.998384f,
0.998508f, 0.998623f, 0.998728f, 0.998826f, 0.998916f,
0.999000f, 0.999076f, 0.999147f, 0.999213f, 0.999273f,
0.999329f, 0.999381f, 0.999428f, 0.999472f, 0.999513f,
0.999550f, 0.999585f, 0.999617f, 0.999646f, 0.999673f,
0.999699f, 0.999722f, 0.999743f, 0.999763f, 0.999781f,
0.999798f, 0.999813f, 0.999828f, 0.999841f, 0.999853f,
0.999865f, 0.999875f, 0.999885f, 0.999893f, 0.999902f,
0.999909f, 0.999916f, 0.999923f, 0.999929f, 0.999934f,
0.999939f, 0.999944f, 0.999948f, 0.999952f, 0.999956f,
0.999959f, 0.999962f, 0.999965f, 0.999968f, 0.999970f,
0.999973f, 0.999975f, 0.999977f, 0.999978f, 0.999980f,
0.999982f, 0.999983f, 0.999984f, 0.999986f, 0.999987f,
0.999988f, 0.999989f, 0.999990f, 0.999990f, 0.999991f,
0.999992f, 0.999992f, 0.999993f, 0.999994f, 0.999994f,
0.999994f, 0.999995f, 0.999995f, 0.999996f, 0.999996f,
0.999996f, 0.999997f, 0.999997f, 0.999997f, 0.999997f,
0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f,
0.999998f, 0.999998f, 0.999999f, 0.999999f, 0.999999f,
0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f,
0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f,
1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
1.000000f,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment