diff options
Diffstat (limited to 'tests/use_case/noise_reduction')
-rw-r--r-- | tests/use_case/noise_reduction/RNNNoiseUCTests.cc | 6 | ||||
-rw-r--r-- | tests/use_case/noise_reduction/RNNUCTestCaseData.hpp | 344 | ||||
-rw-r--r-- | tests/use_case/noise_reduction/RNNoiseProcessingTests.cpp | 159 |
3 files changed, 276 insertions, 233 deletions
diff --git a/tests/use_case/noise_reduction/RNNNoiseUCTests.cc b/tests/use_case/noise_reduction/RNNNoiseUCTests.cc index d57fced..c2b7ffb 100644 --- a/tests/use_case/noise_reduction/RNNNoiseUCTests.cc +++ b/tests/use_case/noise_reduction/RNNNoiseUCTests.cc @@ -23,7 +23,7 @@ #include <catch.hpp> #include <hal.h> #include <Profiler.hpp> -#include <iostream> + #define PLATFORM \ hal_platform platform; \ data_acq_module data_acq; \ @@ -177,8 +177,8 @@ void testInfByIndex(std::vector<uint32_t>& numberOfInferences) { std::vector<int16_t> runtime(g_FrameLength); std::memcpy(runtime.data(), &memDump[startOfLastInfOut], oneInferenceOutSizeBytes); - /* Margin of 22 is 0.03% error. */ - REQUIRE_THAT(golden, Catch::Matchers::Approx(runtime).margin(22)); + /* Margin of 43 is 0.07% error. */ + REQUIRE_THAT(golden, Catch::Matchers::Approx(runtime).margin(43)); } ++infIndex; } diff --git a/tests/use_case/noise_reduction/RNNUCTestCaseData.hpp b/tests/use_case/noise_reduction/RNNUCTestCaseData.hpp index 37bc6a5..85793cf 100644 --- a/tests/use_case/noise_reduction/RNNUCTestCaseData.hpp +++ b/tests/use_case/noise_reduction/RNNUCTestCaseData.hpp @@ -20,159 +20,207 @@ #include <cstdint> /* 1st inference denoised output. */ -int16_t denoisedInf0 [480] = { - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0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0x3, 0x3, 0x3, 0x2, 0x2, + 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x1, 0x2, + 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, + 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x2, + 0x1, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, + 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, -0x1, + 0x0, 0x0, -0x1, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x1, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x3, + 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, + 0x3, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2, + 0x2, 0x2, 0x3, 0x3, 0x3, 0x4, 0x4, 0x5, + 0x5, 0x6, 0x7, 0x7, 0x8, 0x8, 0x9, 0xa, + 0xa, 0xb, 0xb, 0xb, 0xc, 0xc, 0xd, 0xd, + 0xd, 0xe, 0xd, 0xe, 0xe, 0xd, 0xe, 0xd, + 0xd, 0xd, 0xc, 0xc, 0xc, 0xc, 0xc, 0xb, + 0xc, 0xc, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, + 0x12, 0x13, 0x15, 0x16, 0x17, 0x19, 0x19, 0x1a, + 0x1b, 0x1b, 0x1b, 0x1a, 0x19, 0x19, 0x17, 0x16, + 0x15, 0x13, 0x12, 0x10, 0x10, 0x10, 0xf, 0x10, + 0x10, 0x11, 0x12, 0x13, 0x15, 0x16, 0x18, 0x1b, + 0x1b, 0x1f, 0x20, 0x21, 0x24, 0x20, 0x23, 0x21 }; /* 2nd inference denoised output. */ -int16_t denoisedInf1 [480] = { - 0x11, 0x17, 0x29, 0x23, 0x33, 0x43, 0x3f, 0x53, 0x52, 0x4b, - 0x46, 0x32, 0x27, 0x13, -0x2, -0x1c, -0x2f, -0x2f, -0x2e, -0x2c, - -0x34, -0x31, -0x2f, -0x34, -0x30, -0x4a, -0x38, -0x18, -0x25, -0x1a, - -0x15, -0x14, -0x12, -0x1d, -0x21, -0x2f, -0x32, -0x36, -0x33, -0x29, - -0x31, -0x23, -0x26, -0x30, -0x2b, -0x38, -0x2e, -0x22, -0x36, -0x53, - -0x60, -0x5a, -0x62, -0x6c, -0x84, -0xa1, -0xa0, -0xb1, -0xc2, -0xb0, - -0xa9, -0x9c, -0x85, -0x97, -0xa2, -0x99, -0x9f, -0x9e, -0xa4, -0xa6, - -0x97, -0x92, -0x8e, -0x9f, -0xb1, -0xb6, -0xbf, -0xc4, -0xcc, -0xae, - -0x91, -0x8a, -0x7f, -0x8a, -0x84, -0x8e, -0x98, -0x88, -0xa5, -0x9f, - -0x97, -0xa2, -0x8e, -0x97, -0x88, -0x76, -0x7c, -0x7c, -0x91, -0x85, - -0x82, -0x88, -0x78, -0x78, -0x5f, -0x55, -0x48, -0x3c, -0x4b, -0x2f, - -0x3a, -0x48, -0x31, -0x3b, -0x21, -0xc, -0x18, -0x16, -0x29, -0x2e, - -0x30, -0x39, -0x39, -0x3f, -0x30, -0x2f, -0x3b, -0x30, -0x33, -0x31, - -0x29, -0x38, -0x3d, -0x36, -0x3e, -0x48, -0x46, -0x46, -0x3a, -0x39, - -0x42, -0x3a, -0x44, -0x52, -0x53, -0x60, -0x60, -0x66, -0x6d, -0x5b, - -0x53, -0x47, -0x35, -0x2b, -0x24, -0x26, -0x24, -0x20, -0x20, -0x26, - -0x23, -0x17, -0xf, -0x6, -0xb, -0xc, -0x22, -0x39, -0x21, -0x25, - -0x21, -0x17, -0x23, -0x10, -0x24, -0x2b, -0x31, -0x5c, -0x43, -0x42, - -0x53, -0x33, -0x19, -0x14, -0x28, -0x29, -0x33, -0x36, -0x29, -0x46, - -0x3c, -0x35, -0x3e, -0x30, -0x49, -0x52, -0x55, -0x5f, -0x56, -0x50, - -0x47, -0x4b, -0x4f, -0x5e, -0x5e, -0x47, -0x56, -0x4f, -0x37, -0x27, - -0x15, -0x10, 0x6, 0x15, 0x2b, 0x36, 0x31, 0x45, 0x47, 0x53, - 0x4d, 0x3f, 0x55, 0x53, 0x5d, 0x65, 0x5a, 0x55, 0x45, 0x40, - 0x39, 0x35, 0x32, 0x35, 0x44, 0x36, 0x3d, 0x4b, 0x4c, 0x51, - 0x4c, 0x5a, 0x5b, 0x60, 0x69, 0x58, 0x53, 0x3f, 0x22, -0x1, - -0x21, -0x20, -0x2a, -0x30, -0x2c, -0x2a, -0x2f, -0x34, -0x28, -0x30, - -0x31, -0x2d, -0x29, -0x1d, -0x2b, -0x23, -0x1c, -0x20, -0x13, -0x12, - -0x9, -0x18, -0x1d, -0x17, -0x2c, -0x24, -0x26, -0x2e, -0x29, -0x3c, - -0x46, -0x51, -0x62, -0x74, -0x80, -0x88, -0x9d, -0xa4, -0xac, -0xa1, - -0x92, -0x8c, -0x6f, -0x65, -0x53, -0x42, -0x4b, -0x3a, -0x35, -0x44, - -0x44, -0x46, -0x5c, -0x6f, -0x77, -0x8d, -0x90, -0x96, -0xa3, -0x9c, - -0xa8, -0xa1, -0x8e, -0x7e, -0x5d, -0x50, -0x40, -0x35, -0x36, -0x30, - -0x3a, -0x32, -0x2b, -0x34, -0x33, -0x40, -0x51, -0x51, -0x4a, -0x47, - -0x35, -0x20, -0x19, -0xa, -0xd, -0x1b, -0x15, -0x19, -0x22, -0x1f, - -0x1c, -0x21, -0x21, -0x17, -0x1e, -0x1d, -0x4, 0x4, 0xd, 0x24, - 0x2c, 0x3d, 0x54, 0x50, 0x58, 0x5f, 0x5d, 0x64, 0x56, 0x5b, - 0x67, 0x60, 0x76, 0x7d, 0x77, 0x8b, 0x96, 0x9b, 0x9e, 0xa3, - 0xa8, 0x9d, 0x9a, 0x9a, 0x87, 0x78, 0x64, 0x49, 0x44, 0x38, - 0x11, -0x11, -0x24, -0x29, -0x35, -0x3f, -0x35, -0x32, -0x20, -0x1a, - -0x2a, -0x1d, -0x28, -0x3a, -0x3f, -0x53, -0x56, -0x5e, -0x59, -0x41, - -0x40, -0x2e, -0x22, -0x1a, 0x7, 0x19, 0x27, 0x32, 0x37, 0x38, - 0x23, 0x11, -0x7, -0x1f, -0x29, -0x36, -0x34, -0x35, -0x2f, -0xb, - 0xb, 0x14, 0x25, 0x3f, 0x51, 0x49, 0x54, 0x6a, 0x5f, 0x5b, - 0x66, 0x5d, 0x59, 0x4f, 0x3a, 0x3b, 0x30, 0x2f, 0x2d, 0x1b, - 0x2f, 0x2e, 0x28, 0x3a, 0x2c, 0x37, 0x47, 0x4c, 0x5e, 0x58, - 0x52, 0x4b, 0x45, 0x43, 0x36, 0x3f, 0x42, 0x49, 0x54, 0x4e, - 0x61, 0x60, 0x59, 0x6b, 0x65, 0x60, 0x5e, 0x4e, 0x3d, 0x2e, - 0x2a, 0x2c, 0x2f, 0x2b, 0x30, 0x3d, 0x47, 0x57, 0x61, 0x6d, +int16_t denoisedInf1 [512] = { + 0x13, 0x1f, 0x31, 0x2b, 0x3c, 0x4d, 0x4c, 0x5c, + 0x61, 0x54, 0x4e, 0x3a, 0x26, 0x19, -0x6, -0x22, + -0x36, -0x3c, -0x30, -0x36, -0x3e, -0x38, -0x3c, -0x35, + -0x3a, -0x57, -0x41, -0x1c, -0x26, -0x26, -0x15, -0x17, + -0x17, -0x1b, -0x2b, -0x2f, -0x37, -0x3b, -0x30, -0x2e, + -0x2f, -0x23, -0x24, -0x2b, -0x2d, -0x35, -0x2e, -0x18, + -0x2e, -0x5a, -0x60, -0x5d, -0x63, -0x6c, -0x8f, -0xad, + -0xaa, -0xbf, -0xd3, -0xbf, -0xb7, -0xa8, -0x8c, -0xa0, + -0xb2, -0xa3, -0xa7, -0xab, -0xae, -0xb5, -0xa5, -0x98, + -0x9c, -0xa9, -0xc3, -0xca, -0xc9, -0xde, -0xdf, -0xc0, + -0x9f, -0x8d, -0x92, -0x91, -0x90, -0x9f, -0x9c, -0x99, + -0xac, -0xae, -0xa4, -0xa6, -0xa2, -0x9c, -0x97, -0x81, + -0x7c, -0x91, -0x99, -0x95, -0x90, -0x90, -0x91, -0x7f, + -0x70, -0x63, -0x4b, -0x50, -0x52, -0x38, -0x44, -0x50, + -0x40, -0x3f, -0x2a, -0xd, -0x17, -0x21, -0x29, -0x36, + -0x35, -0x38, -0x42, -0x3f, -0x31, -0x30, -0x3d, -0x38, + -0x34, -0x38, -0x2f, -0x40, -0x4e, -0x3f, -0x4f, -0x5d, + -0x5b, -0x60, -0x4f, -0x51, -0x5e, -0x51, -0x60, -0x70, + -0x6f, -0x7d, -0x7b, -0x7f, -0x89, -0x70, -0x64, -0x59, + -0x3e, -0x34, -0x27, -0x25, -0x26, -0x15, -0x18, -0x1b, + -0x13, -0xb, 0xa, 0xb, 0xb, 0x10, -0x17, -0x28, + -0x15, -0x16, -0x13, -0x15, -0x18, -0x12, -0x24, -0x2d, + -0x40, -0x69, -0x57, -0x4a, -0x69, -0x4a, -0x18, -0x24, + -0x30, -0x36, -0x44, -0x38, -0x35, -0x4b, -0x46, -0x3c, + -0x3d, -0x35, -0x46, -0x5a, -0x55, -0x5e, -0x5b, -0x47, + -0x48, -0x45, -0x4c, -0x64, -0x5a, -0x48, -0x55, -0x57, + -0x3a, -0x23, -0x1b, -0xf, -0x1, 0x15, 0x2f, 0x33, + 0x35, 0x43, 0x51, 0x5d, 0x54, 0x49, 0x5d, 0x67, + 0x6c, 0x7a, 0x6f, 0x61, 0x5a, 0x4c, 0x49, 0x42, + 0x36, 0x44, 0x4c, 0x40, 0x44, 0x53, 0x59, 0x55, + 0x58, 0x62, 0x65, 0x6d, 0x74, 0x67, 0x5b, 0x50, + 0x2d, 0x2, -0x1b, -0x1d, -0x1e, -0x2d, -0x25, -0x1e, + -0x2c, -0x29, -0x21, -0x25, -0x29, -0x27, -0x19, -0x16, + -0x21, -0x1d, -0x16, -0x17, -0x13, -0x9, -0x9, -0x1c, + -0x1f, -0x1e, -0x30, -0x2f, -0x2c, -0x37, -0x32, -0x3f, + -0x53, -0x55, -0x6c, -0x82, -0x84, -0x93, -0xa3, -0xb1, + -0xba, -0xab, -0xa1, -0x96, -0x7c, -0x6e, -0x5d, -0x4d, + -0x56, -0x47, -0x39, -0x52, -0x4f, -0x4a, -0x69, -0x75, + -0x83, -0x97, -0x97, -0xa1, -0xa8, -0xa6, -0xb1, -0xab, + -0x98, -0x83, -0x65, -0x52, -0x44, -0x37, -0x34, -0x34, + -0x3b, -0x35, -0x2a, -0x34, -0x37, -0x41, -0x5c, -0x57, + -0x50, -0x53, -0x3c, -0x29, -0x23, -0x13, -0x1a, -0x2b, + -0x24, -0x26, -0x31, -0x2c, -0x27, -0x2e, -0x2b, -0x1c, + -0x25, -0x26, -0x4, 0x6, 0xd, 0x29, 0x2e, 0x43, + 0x5e, 0x54, 0x5d, 0x64, 0x63, 0x6c, 0x59, 0x5e, + 0x6d, 0x62, 0x7b, 0x84, 0x76, 0x8e, 0x9a, 0x9b, + 0xa0, 0xa3, 0xac, 0x9d, 0x99, 0xa1, 0x88, 0x7c, + 0x65, 0x44, 0x4a, 0x3d, 0x12, -0x18, -0x2c, -0x28, + -0x3b, -0x45, -0x3d, -0x3b, -0x20, -0x1e, -0x2f, -0x1e, + -0x27, -0x38, -0x3e, -0x4f, -0x54, -0x5e, -0x57, -0x3e, + -0x3b, -0x2c, -0x1e, -0x19, 0xa, 0x21, 0x29, 0x35, + 0x3c, 0x3c, 0x28, 0x12, -0x4, -0x1d, -0x27, -0x2e, + -0x2e, -0x30, -0x2c, -0x1, 0x18, 0x17, 0x2a, 0x46, + 0x58, 0x4a, 0x51, 0x72, 0x5d, 0x58, 0x68, 0x5a, + 0x5d, 0x4e, 0x3a, 0x3e, 0x31, 0x36, 0x2f, 0x19, + 0x30, 0x2e, 0x27, 0x38, 0x29, 0x2f, 0x44, 0x48, + 0x59, 0x57, 0x49, 0x47, 0x42, 0x3c, 0x33, 0x36, + 0x3e, 0x45, 0x4e, 0x4d, 0x5c, 0x62, 0x56, 0x6a, + 0x6a, 0x5b, 0x64, 0x4e, 0x39, 0x30, 0x23, 0x30, + 0x31, 0x2a, 0x38, 0x40, 0x53, 0x62, 0x6b, 0x80, + 0x84, 0x85, 0x7e, 0x6c, 0x6d, 0x5f, 0x4b, 0x49, + 0x43, 0x3b, 0x30, 0x30, 0x31, 0x25, 0x36, 0x38, + 0x25, 0x30, 0x21, 0x7, 0x14, 0x17, 0xc, 0x2, + -0x1, 0xf, 0x10, 0x4, 0x8, 0x16, 0x1f, 0x21 }; -/* Final denoised results after 134 steps */ -int16_t denoisedInf2 [480] = { - -0x66, -0x8a, -0x8a, -0x6f, -0x99, -0x9c, -0x92, -0xbf, -0xa4, -0xb1, - -0xf0, -0xf1, -0xf3, -0xe5, -0xf9, -0x107, -0xd2, -0xe8, -0x100, -0xdb, - -0xda, -0xec, -0xfa, -0xfd, -0xe7, -0xd6, -0xe6, -0xfd, -0x102, -0xfc, - -0xfd, -0x11f, -0x123, -0x119, -0x11c, -0xf6, -0x10a, -0x130, -0x10f, -0x107, - -0x106, -0x10e, -0x11f, -0xff, -0xed, -0xf3, -0xee, -0xfb, -0x10f, -0x108, - -0xe9, -0xd4, -0xda, -0xe7, -0xed, -0xf0, -0xf1, -0x10c, -0xff, -0xd3, - -0xfb, -0xed, -0xc9, -0x107, -0xe4, -0xbb, -0xe9, -0xeb, -0xf6, -0xfb, - -0x114, -0x12e, -0x105, -0x116, -0x134, -0x138, -0x149, -0x12a, -0x11a, -0x13c, - -0x151, -0x13f, -0x13a, -0x16f, -0x176, -0x15d, -0x16d, -0x169, -0x163, -0x170, - -0x176, -0x181, -0x17d, -0x173, -0x18b, -0x1af, -0x1ad, -0x185, -0x18c, -0x1b0, - -0x1aa, -0x1b9, -0x1c0, -0x1b7, -0x1d5, -0x1d7, -0x1ca, -0x1cd, -0x1e8, -0x1f3, - -0x1c6, -0x1cd, -0x1c2, -0x191, -0x1a2, -0x1a3, -0x193, -0x187, -0x19b, -0x1b0, - -0x184, -0x199, -0x1bb, -0x1a9, -0x196, -0x18c, -0x1b7, -0x1b0, -0x19d, -0x1b9, - -0x1b2, -0x1c2, -0x1d1, -0x1dd, -0x1ce, -0x1a6, -0x1cf, -0x1e4, -0x1dc, -0x1c9, - -0x1bc, -0x1e2, -0x1c8, -0x1c7, -0x1d5, -0x1c1, -0x1dc, -0x1bd, -0x1cd, -0x1fe, - -0x1d7, -0x1e6, -0x1f3, -0x1f3, -0x201, -0x1f0, -0x1f8, -0x1f0, -0x1f4, -0x206, - -0x1f3, -0x206, -0x20d, -0x1f5, -0x1e1, -0x1d5, -0x1fe, -0x214, -0x1f4, -0x1f3, - -0x21a, -0x232, -0x214, -0x203, -0x20b, -0x1fc, -0x1f9, -0x1ef, -0x1e5, -0x1ef, - -0x1de, -0x1dd, -0x1ea, -0x1f2, -0x219, -0x21d, -0x201, -0x1ff, -0x1fa, -0x205, - -0x21f, -0x215, -0x210, -0x217, -0x20c, -0x21f, -0x223, -0x202, -0x208, -0x21f, - -0x233, -0x22f, -0x221, -0x229, -0x233, -0x239, -0x218, -0x21d, -0x242, -0x22e, - -0x23d, -0x239, -0x22f, -0x251, -0x238, -0x22e, -0x22e, -0x234, -0x236, -0x1fc, - -0x220, -0x254, -0x241, -0x249, -0x250, -0x260, -0x25e, -0x244, -0x24c, -0x267, - -0x268, -0x25d, -0x272, -0x24e, -0x245, -0x275, -0x259, -0x254, -0x251, -0x252, - -0x27e, -0x251, -0x23f, -0x25b, -0x24c, -0x254, -0x270, -0x274, -0x265, -0x267, - -0x265, -0x274, -0x27f, -0x25c, -0x279, -0x282, -0x266, -0x281, -0x271, -0x264, - -0x26e, -0x262, -0x262, -0x267, -0x270, -0x25e, -0x260, -0x276, -0x269, -0x273, - -0x286, -0x282, -0x27d, -0x27d, -0x282, -0x292, -0x289, -0x25e, -0x263, -0x253, - -0x22b, -0x24a, -0x26d, -0x27c, -0x263, -0x251, -0x269, -0x256, -0x25d, -0x263, - -0x259, -0x26b, -0x267, -0x26e, -0x267, -0x267, -0x265, -0x24f, -0x277, -0x25e, - -0x24d, -0x28e, -0x26b, -0x251, -0x25b, -0x256, -0x26f, -0x256, -0x245, -0x25c, - -0x266, -0x26d, -0x266, -0x260, -0x25f, -0x265, -0x25d, -0x254, -0x26b, -0x257, - -0x252, -0x27d, -0x270, -0x265, -0x274, -0x25a, -0x24d, -0x25b, -0x258, -0x255, - -0x256, -0x25c, -0x260, -0x247, -0x24b, -0x25a, -0x24e, -0x250, -0x23b, -0x234, - -0x254, -0x242, -0x22b, -0x241, -0x247, -0x231, -0x22a, -0x223, -0x20c, -0x212, - -0x219, -0x209, -0x203, -0x203, -0x200, -0x205, -0x217, -0x212, -0x205, -0x20c, - -0x1ec, -0x1ef, -0x20d, -0x1f2, -0x1ee, -0x1f3, -0x1eb, -0x1e4, -0x1ca, -0x1c6, - -0x1b7, -0x1b2, -0x1d4, -0x1d9, -0x1b7, -0x199, -0x1b7, -0x1c7, -0x1a5, -0x199, - -0x18d, -0x1a7, -0x1c0, -0x1a9, -0x1b6, -0x1a7, -0x17f, -0x18c, -0x186, -0x172, - -0x173, -0x178, -0x192, -0x190, -0x16d, -0x174, -0x17f, -0x179, -0x173, -0x15b, - -0x167, -0x17b, -0x16b, -0x169, -0x15c, -0x160, -0x16c, -0x156, -0x159, -0x151, - -0x13f, -0x147, -0x13f, -0x144, -0x133, -0x116, -0x12b, -0x134, -0x120, -0x118, - -0x115, -0x110, -0x114, -0x125, -0x128, -0x11f, -0x112, -0xfb, -0xf1, -0xe9, - -0xc2, -0xa7, -0xb3, -0xc3, -0xbf, -0x9f, -0x96, -0xa6, -0xa8, -0xb6, - -0xa8, -0x8e, -0xa6, -0xb9, -0xb1, -0x9e, -0x96, -0x80, -0x69, -0x6a, - -0x55, -0x5b, -0x67, -0x69, -0x7b, -0x5d, -0x67, -0x6a, -0x48, -0x66, - -0x50, -0x37, -0x41, -0x42, -0x45, -0x1a, -0x23, -0x33, -0x27, -0x3a, - -0x1b, -0xf, -0x4, 0x2, -0x12, 0x8, -0x11, 0x7, 0x29, 0x8, +/* Final denoised results after 128 steps */ +int16_t denoisedInf2 [512] = { + -0x1a1, -0x19b, -0x1ad, -0x1b3, -0x1c1, -0x1d1, -0x1c2, -0x1b5, + -0x1bb, -0x1d0, -0x1d8, -0x1c7, -0x1d2, -0x1d6, -0x1bf, -0x1c6, + -0x1c4, -0x1b9, -0x1c1, -0x1ba, -0x1c9, -0x1e0, -0x1d2, -0x1d6, + -0x1e7, -0x1e8, -0x1ef, -0x1f2, -0x1eb, -0x1e2, -0x1f0, -0x209, + -0x205, -0x205, -0x20c, -0x1f9, -0x1df, -0x1de, -0x1fc, -0x20d, + -0x1f5, -0x1ed, -0x20f, -0x225, -0x21a, -0x20b, -0x209, -0x205, + -0x1fd, -0x1ef, -0x1ec, -0x1f5, -0x1e2, -0x1dc, -0x1ef, -0x1f5, + -0x20d, -0x21d, -0x211, -0x20b, -0x1f9, -0x202, -0x225, -0x219, + -0x20f, -0x213, -0x20d, -0x21f, -0x226, -0x210, -0x209, -0x21d, + -0x236, -0x238, -0x22b, -0x228, -0x23f, -0x245, -0x225, -0x22e, + -0x24b, -0x246, -0x246, -0x23b, -0x23c, -0x255, -0x243, -0x22a, + -0x231, -0x23e, -0x235, -0x209, -0x218, -0x24d, -0x242, -0x242, + -0x25c, -0x26b, -0x27b, -0x25a, -0x24a, -0x26d, -0x26d, -0x272, + -0x26f, -0x243, -0x253, -0x27b, -0x26c, -0x25a, -0x25b, -0x270, + -0x28a, -0x26d, -0x253, -0x269, -0x259, -0x24d, -0x270, -0x274, + -0x272, -0x27a, -0x26e, -0x27e, -0x279, -0x262, -0x285, -0x28d, + -0x27a, -0x289, -0x280, -0x27a, -0x282, -0x270, -0x265, -0x272, + -0x27b, -0x269, -0x263, -0x27a, -0x277, -0x275, -0x285, -0x27f, + -0x287, -0x28b, -0x288, -0x29d, -0x28d, -0x274, -0x275, -0x25e, + -0x249, -0x260, -0x281, -0x27c, -0x25f, -0x25f, -0x261, -0x254, + -0x25a, -0x264, -0x261, -0x260, -0x26e, -0x278, -0x279, -0x281, + -0x26c, -0x25d, -0x278, -0x264, -0x258, -0x281, -0x274, -0x25b, + -0x267, -0x266, -0x26c, -0x25e, -0x243, -0x258, -0x270, -0x272, + -0x270, -0x261, -0x261, -0x266, -0x251, -0x24d, -0x261, -0x254, + -0x254, -0x27c, -0x278, -0x26b, -0x279, -0x260, -0x250, -0x264, + -0x25b, -0x250, -0x252, -0x258, -0x25b, -0x242, -0x243, -0x251, + -0x241, -0x242, -0x23d, -0x241, -0x268, -0x254, -0x230, -0x23a, + -0x231, -0x226, -0x22c, -0x222, -0x211, -0x20f, -0x214, -0x203, + -0x1f1, -0x1f5, -0x1eb, -0x1f1, -0x207, -0x1fe, -0x200, -0x1ff, + -0x1e1, -0x1e9, -0x1fb, -0x1ea, -0x1e1, -0x1ec, -0x1e8, -0x1d3, + -0x1c7, -0x1bd, -0x1a7, -0x19d, -0x1b1, -0x1c0, -0x19e, -0x182, + -0x1a6, -0x1b8, -0x1a2, -0x18d, -0x17e, -0x194, -0x1a1, -0x188, + -0x18d, -0x181, -0x15e, -0x169, -0x166, -0x14e, -0x14b, -0x155, + -0x170, -0x16c, -0x151, -0x158, -0x15e, -0x15b, -0x14e, -0x138, + -0x13e, -0x144, -0x139, -0x134, -0x12c, -0x131, -0x137, -0x131, + -0x134, -0x12d, -0x122, -0x125, -0x126, -0x12b, -0x119, -0xfa, + -0x101, -0x105, -0xeb, -0xe2, -0xe6, -0xe4, -0xef, -0xff, + -0x102, -0xfd, -0xf1, -0xdc, -0xd8, -0xda, -0xbe, -0xa4, + -0xad, -0xb9, -0xad, -0x95, -0x8c, -0x90, -0x90, -0x9a, + -0x99, -0x80, -0x88, -0xa0, -0x95, -0x8c, -0x86, -0x72, + -0x6e, -0x6e, -0x66, -0x65, -0x61, -0x60, -0x5f, -0x52, + -0x50, -0x4c, -0x40, -0x51, -0x56, -0x37, -0x3a, -0x4d, + -0x3d, -0x2a, -0x24, -0x2a, -0x33, -0x2e, -0x27, -0x12, + -0x2, -0xf, -0x8, -0x7, -0x17, -0x1, 0x8, -0x6, + 0xc, 0xc, 0x3, 0x11, 0x18, 0x24, 0x22, 0x16, + 0x2b, 0x37, 0x32, 0x2e, 0x25, 0x39, 0x45, 0x34, + 0x47, 0x66, 0x5a, 0x40, 0x39, 0x48, 0x53, 0x4d, + 0x49, 0x44, 0x43, 0x4d, 0x4e, 0x4b, 0x55, 0x54, + 0x3f, 0x38, 0x4d, 0x60, 0x55, 0x48, 0x5b, 0x66, + 0x56, 0x55, 0x63, 0x6a, 0x63, 0x5e, 0x62, 0x61, + 0x62, 0x5c, 0x4f, 0x61, 0x79, 0x77, 0x69, 0x6a, + 0x84, 0x95, 0x95, 0x90, 0x8d, 0xb2, 0xbc, 0x8c, + 0x9e, 0xb2, 0x9c, 0xb8, 0xb4, 0x8f, 0xa8, 0xb2, + 0xa2, 0xa9, 0xb7, 0xcf, 0xd9, 0xd5, 0xd7, 0xdc, + 0xf1, 0xf5, 0xe6, 0xf9, 0x107, 0xf6, 0xf6, 0xfa, + 0xf6, 0x106, 0x116, 0x112, 0x106, 0x104, 0x10c, 0x102, + 0xef, 0xfd, 0x110, 0x107, 0xf6, 0xfa, 0x112, 0x119, + 0x10e, 0x115, 0x11e, 0x11d, 0x119, 0x11e, 0x12f, 0x12c, + 0x128, 0x135, 0x137, 0x136, 0x127, 0x11d, 0x13b, 0x143, + 0x142, 0x142, 0x137, 0x15c, 0x166, 0x145, 0x150, 0x156, + 0x15e, 0x167, 0x149, 0x157, 0x162, 0x14a, 0x159, 0x158, + 0x14d, 0x152, 0x13d, 0x142, 0x160, 0x166, 0x163, 0x16a, + 0x18a, 0x195, 0x17e, 0x184, 0x19d, 0x1a4, 0x193, 0x17e, + 0x188, 0x198, 0x193, 0x184, 0x194, 0x1ac, 0x196, 0x18c, }; static int16_t* ofms[3] = {denoisedInf0, denoisedInf1, denoisedInf2}; diff --git a/tests/use_case/noise_reduction/RNNoiseProcessingTests.cpp b/tests/use_case/noise_reduction/RNNoiseProcessingTests.cpp index 24dd550..e28a6da 100644 --- a/tests/use_case/noise_reduction/RNNoiseProcessingTests.cpp +++ b/tests/use_case/noise_reduction/RNNoiseProcessingTests.cpp @@ -19,7 +19,7 @@ #include <limits> -/* Elements [0:480] from p232_113.wav cast as fp32. */ +/* Elements [0:512] from p232_113.wav cast as fp32. */ const std::vector<float> testWav0 = std::vector<float>{ -1058.0, -768.0, -737.0, -1141.0, -1015.0, -315.0, -205.0, -105.0, -150.0, 277.0, 424.0, 523.0, 431.0, 256.0, 441.0, 830.0, 413.0, 421.0, 1002.0, 1186.0, @@ -68,15 +68,16 @@ const std::vector<float> testWav0 = std::vector<float>{ -948.0, -1047.0, -1250.0, -1691.0, -2110.0, -2790.0, -2818.0, -2589.0, -2415.0, -2710.0, -2744.0, -2767.0, -2506.0, -2285.0, -2361.0, -2103.0, -2336.0, -2341.0, -2687.0, -2667.0, -2925.0, -2761.0, -2816.0, -2644.0, -2456.0, -2186.0, -2092.0, -2498.0, -2773.0, -2554.0, - -2218.0, -2626.0, -2996.0, -3119.0, -2574.0, -2582.0, -3009.0, -2876.0, -2747.0, -2999.0 -}; - -/* Elements [480:960] from p232_113.wav cast as fp32. */ -const std::vector<float> testWav1 = std::vector<float>{ + -2218.0, -2626.0, -2996.0, -3119.0, -2574.0, -2582.0, -3009.0, -2876.0, -2747.0, -2999.0, -2918.0, -2418.0, -2452.0, -2172.0, -2261.0, -2337.0, -2399.0, -2209.0, -2269.0, -2509.0, -2721.0, -2884.0, -2891.0, -3440.0, -3757.0, -4338.0, -4304.0, -4587.0, -4714.0, -5686.0, -5699.0, -5447.0, -5008.0, -5052.0, -5135.0, -4807.0, -4515.0, -3850.0, -3804.0, -3813.0, - -3451.0, -3527.0, -3764.0, -3627.0, -3527.0, -3737.0, -4043.0, -4394.0, -4672.0, -4561.0, + -3451.0, -3527.0 +}; + +/* Elements [512:1024] from p232_113.wav cast as fp32. */ +const std::vector<float> testWav1 = std::vector<float>{ + -3764.0, -3627.0, -3527.0, -3737.0, -4043.0, -4394.0, -4672.0, -4561.0, -4718.0, -4737.0, -5018.0, -5187.0, -5043.0, -4734.0, -4841.0, -5363.0, -5870.0, -5697.0, -5731.0, -6081.0, -6557.0, -6306.0, -6422.0, -5990.0, -5738.0, -5559.0, -5880.0, -6093.0, -6718.0, -6853.0, -6966.0, -6907.0, -6887.0, -7046.0, -6902.0, -6927.0, -6754.0, -6891.0, @@ -120,94 +121,88 @@ const std::vector<float> testWav1 = std::vector<float>{ 1507.0, 829.0, 296.0, 519.0, 716.0, 961.0, 175.0, -494.0, -501.0, -628.0, -658.0, -700.0, -989.0, -1342.0, -1298.0, -1347.0, -1223.0, -1388.0, -1308.0, -1184.0, -468.0, -2.0, -444.0, -388.0, -80.0, 361.0, 700.0, 120.0, 101.0, 464.0, - 654.0, 40.0, -586.0, -607.0, -730.0, -705.0, -844.0, -692.0, -1032.0, -1216.0 + 654.0, 40.0, -586.0, -607.0, -730.0, -705.0, -844.0, -692.0, -1032.0, -1216.0, + -1511.0, -1479.0, -1641.0, -2133.0, -2027.0, -1997.0, -1868.0, -1778.0, -1920.0, -2122.0, + -2293.0, -2552.0, -2771.0, -3030.0, -2462.0, -2665.0, -2866.0, -3601.0, -3459.0, -3388.0, + -3216.0, -3834.0, -4424.0, -4587.0, -4396.0, -3942.0, -3761.0, -3631.0, -3528.0, -4064.0, + -4095.0, -4370.0, -4297.0, -4932.0, -4613.0, -4339.0, -4483.0, -4407.0, -4203.0, -4240.0, + -4196.0, -3745.0, -3501.0, -3514.0, -3461.0, -3578.0, -3588.0, -3747.0, -3706.0, -3171.0, + -2746.0, -2936.0, -2737.0, -2976.0, -2324.0, -1975.0, -2117.0, -2743.0, -2242.0, -1549.0, + -1485.0, -2059.0, -2376.0, -1977.0 }; -/* Golden RNNoise pre-processing output for [0:480] p232_113.wav */ +/* Golden RNNoise pre-processing output for [0:512] p232_113.wav */ const std::vector<float> RNNoisePreProcessGolden0 { - 4.597353, -0.908727, 1.067204, -0.034760, -0.084974, - -0.361086, -1.494876, -0.173461, -0.671268, 0.245229, - 0.371219, 0.159632, 0.230595, 0.245066, 0.148395, - -0.660396, -0.157954, 0.136425, 0.062801, -0.049542, - 0.179730, 0.178653, 4.597353, -0.908727, 1.067204, - -0.034760, -0.084974, -0.361086, 4.597353, -0.908727, - 1.067204, -0.034760, -0.084974, -0.361086, -1.437083, - -0.722769, -0.232802, -0.178104, -0.431379, -0.591088, - -0.930000, 1.257937 + 4.75129105, -0.87399225, 0.94622732, -0.04182188, 0.05464971, -0.52353621, + -1.40791412, -0.05604708, -0.56039004, 0.48334449, 0.33882704, 0.29808432, + 0.18402454, 0.05289553, -0.13116701, -0.47689547, 0.19254394, -0.01638567, + 0.06637303, 0.07179865, 0.26687299, 0.11071566, 4.75129105, -0.87399225, + 0.94622732, -0.04182188, 0.05464971, -0.52353621, 4.75129105, -0.87399225, + 0.94622732, -0.04182188, 0.05464971, -0.52353621, -1.00467825, -1.2105895, + -0.12928345, -0.18741458, -0.45585857, -0.4011966, -0.91, 1.35764497 }; -/* Golden RNNoise pre-processing output for [480:960] p232_113.wav */ +/* Golden RNNoise pre-processing output for [512:1024] p232_113.wav */ const std::vector<float> RNNoisePreProcessGolden1 { - 11.031052, -1.249548, 2.498929, 0.492149, 0.364215, - 0.138582, -0.846219, 0.279253, -0.526596, 0.610061, - 0.820483, 0.293216, -0.047377, -0.178503, 0.229638, - -0.516174, 0.149612, 0.100330, 0.010542, 0.028561, - -0.037554, -0.094355, 6.433699, -0.340821, 1.431725, - 0.526909, 0.449189, 0.499668, -2.761007, 1.476633, - -0.702682, 0.596430, 0.619138, 1.221840, -0.739308, - -0.490715, -0.085385, 0.035244, 0.104252, -0.192160, - -0.810000, -0.430191 + 11.26880569, -1.26922285, 2.28843852, 0.45148339, 0.53617535, -0.16797574, + -0.90503742, 0.35760545, -0.50392295, 0.97835271, 0.60372606, 0.18782702, + -0.15711423, -0.15144927, 0.00090368, -0.48593647, 0.32602252, 0.00773871, + 0.08888109, 0.05869409, 0.00409013, -0.09099827, 6.51751463, -0.3952306, + 1.34221119, 0.49330527, 0.48152563, 0.35556047, -2.98506748, 1.3527539, + -0.55024345, 0.57694904, 0.3722262, 1.4026329, -0.70134894, -0.60284336, + -0.12922247, 0.143284, 0.23019133, -0.33742403, -0.81, -0.64850574 }; const std::vector<float> RNNoisePostProcessDenoiseGolden0 { - 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, - -1, 0, -1, -1, -1, -1, -1, -1, 0, -1, - -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, - 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, - 5, 5, 5, 5, 5, 4, 5, 4, 4, 4, - 4, 4, 3, 4, 3, 3, 3, 2, 3, 2, - 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, - 0, -1, 0, -1, -1, -1, -1, -1, -2, -1, - -1, -2, -1, -2, -1, -2, -2, -1, -2, -1, - -2, -1, -1, -1, 0, -1, 0, -1, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 0, 1, 1, 1, 2, 1, - 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, - 4, 3, 4, 3, 3, 4, 3, 5, 4, 4, - 4, 4, 5, 4, 5, 4, 4, 5, 4, 5, - 4, 4, 4, 3, 4, 3, 4, 3, 2, 3, - 1, 2, 0, 0, 0, 0, 0, -1, 0, -1, - -2, -1, -3, -1, -3, -2, -2, -3, -2, -3, - -2, -3, -3, -2, -4, -2, -3, -3, -3, -4, - -3, -4, -3, -4, -5, -4, -6, -4, -6, -6, - -5, -7, -5, -7, -6, -6, -7, -6, -8, -6, - -7, -7, -6, -8, -6, -8, -6, -7, -8, -6, - -9, -7, -8, -8, -7, -9, -7, -9, -8, -8, - -8, -6, -8, -5, -6, -5, -3, -3, 0, -1, - 1, 2, 3, 7, 6, 10, 11, 13, 16, 15, - 20, 19, 23, 24, 25, 28, 27, 31, 31, 32, - 34, 32, 35, 33, 35, 35, 34, 36, 33, 35, - 33, 32, 33, 30, 31, 28, 28, 27, 24, 25, - 20, 21, 18, 16, 15, 11, 12, 8, 8, 7, - 4, 6, 1, 3, 1, 0, 2, 0, 2, 0, - 0, 1, 0, 3, 0, 3, 1, 1, 4, 0, - 4, 1, 3, 3, 1, 4, 0, 3, 1, 0, - 2, -1, 1, -1, -1, 0, -3, 0, -3, 0, - -1, -1, 2, 0, 5, 4, 7, 11, 11, 18, - 15, 21, 23, 24, 31, 29, 38, 37, 42, 46, - 45, 54, 51, 59, 60, 61, 68, 62, 70, 66, - 68, 73, 69, 79, 73, 79, 76, 70, 75, 61, - 71, 64, 74, 85, 70, 86, 51, 92, 73 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, + -1, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, + 3, 2, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, + -2, -2, -2, -2, -2, -2, -2, -2, -3, -2, -3, -3, -2, + -3, -2, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -3, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, + -1, 0, -1, -1, -1, -2, -1, -2, -3, -2, -4, -3, -4, + -5, -4, -6, -5, -5, -6, -5, -6, -6, -6, -7, -6, -7, + -7, -7, -8, -7, -7, -8, -7, -8, -7, -7, -8, -6, -7, + -6, -6, -7, -5, -6, -5, -4, -5, -3, -3, -3, -1, -2, + 0, -1, -1, 1, 0, 1, 2, 1, 3, 1, 2, 2, 1, + 2, 0, 0, 0, -2, -1, -3, -4, -4, -6, -6, -8, -9, + -9, -12, -12, -12, -15, -14, -16, -16, -16, -18, -16, -18, -18, + -17, -19, -17, -17, -18, -15, -17, -15, -14, -15, -12, -13, -11, + -9, -10, -7, -8, -7, -5, -7, -4, -5, -6, -4, -8, -6, + -7, -8, -6, -9, -7, -7, -9, -6, -10, -9, -8, -12, -9, + -12, -13, -12, -17, -14, -17, -18, -15, -20, -17, -17, -20, -15, + -20, -17, -16, -20, -15, -19, -17, -15, -20, -13, -16, -15, -9, + -13, -5, -6, -6, 1, -5, 2, 1, -3, 6, -2, 1, 2, + -5, 6, -2, 4, 15, 8, 27, 19, 21, 33, 14, 29, 11, + 12, 40, -12, 53, 35 }; -std::vector<float> RNNoiseModelOutputGolden0{0.157920, 0.392021, 0.368438, 0.258663, 0.202650, - 0.256764, 0.185472, 0.149062, 0.147317, 0.142133, - 0.148236, 0.173523, 0.197672, 0.200920, 0.198408, - 0.147500, 0.140215, 0.166651, 0.250242, 0.256278, - 0.252104, 0.241938}; +std::vector<float> RNNoiseModelOutputGolden0{0.3046875, 0.17578125, 0.1484375, 0.12890625, 0.12109375, + 0.15625, 0.17578125, 0.203125, 0.17578125, 0.16796875, + 0.18359375, 0.22265625, 0.23046875, 0.2421875, 0.23046875, + 0.23046875, 0.25, 0.2734375, 0.29296875, 0.3046875, + 0.33984375, 0.35546875}; TEST_CASE("RNNoise preprocessing calculation test", "[RNNoise]") { |