Commit 2190504c authored by Alex Loiko's avatar Alex Loiko Committed by Commit Bot

Add braces to arrays in unit test.

Beacuse compilation on WIN fails otherwise.

Bug: webrtc:9076
Change-Id: I230a861e6f4c50fce986ed49b5d33458091c2f00
Reviewed-on: https://chromium-review.googlesource.com/1047271
Commit-Queue: Emircan Uysaler <emircan@chromium.org>
Reviewed-by: default avatarEmircan Uysaler <emircan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556464}
parent ceb5764f
......@@ -25,3 +25,4 @@ Local Modifications:
* rnn_vad_weights.h: output layer sizes + weights scaling factor
* removing unwanted extern from constants in rnn_vad_weights.h and using
constants to declare array sizes
* Add braces around arrays in unit test.
\ No newline at end of file
......@@ -94,50 +94,41 @@ INSTANTIATE_TEST_CASE_P(FftPoints,
TEST(RnnVadTest, KissFftBitExactness) {
constexpr std::array<float, 32> samples = {
0.3524301946163177490234375f, 0.891803801059722900390625f,
0.07706542313098907470703125f, 0.699530780315399169921875f,
0.3789891898632049560546875f, 0.5438187122344970703125f,
0.332781612873077392578125f, 0.449340641498565673828125f,
0.105229437351226806640625f, 0.722373783588409423828125f,
0.13155306875705718994140625f, 0.340857982635498046875f,
0.970204889774322509765625f, 0.53061950206756591796875f,
0.91507828235626220703125f, 0.830274522304534912109375f,
0.74468600749969482421875f, 0.24320767819881439208984375f,
0.743998110294342041015625f, 0.17574800550937652587890625f,
0.1834825575351715087890625f, 0.63317775726318359375f,
0.11414264142513275146484375f, 0.1612723171710968017578125f,
0.80316197872161865234375f, 0.4979794919490814208984375f,
0.554282128810882568359375f, 0.67189347743988037109375f,
0.06660757958889007568359375f, 0.89568817615509033203125f,
0.29327380657196044921875f, 0.3472573757171630859375f};
{0.3524301946163177490234375f, 0.891803801059722900390625f,
0.07706542313098907470703125f, 0.699530780315399169921875f,
0.3789891898632049560546875f, 0.5438187122344970703125f,
0.332781612873077392578125f, 0.449340641498565673828125f,
0.105229437351226806640625f, 0.722373783588409423828125f,
0.13155306875705718994140625f, 0.340857982635498046875f,
0.970204889774322509765625f, 0.53061950206756591796875f,
0.91507828235626220703125f, 0.830274522304534912109375f,
0.74468600749969482421875f, 0.24320767819881439208984375f,
0.743998110294342041015625f, 0.17574800550937652587890625f,
0.1834825575351715087890625f, 0.63317775726318359375f,
0.11414264142513275146484375f, 0.1612723171710968017578125f,
0.80316197872161865234375f, 0.4979794919490814208984375f,
0.554282128810882568359375f, 0.67189347743988037109375f,
0.06660757958889007568359375f, 0.89568817615509033203125f,
0.29327380657196044921875f, 0.3472573757171630859375f}};
constexpr std::array<float, 17> expected_real = {
0.4813065826892852783203125f, -0.0246877372264862060546875f,
0.04095232486724853515625f, -0.0401695556938648223876953125f,
0.00500857271254062652587890625f, 0.0160773508250713348388671875f,
-0.011385642923414707183837890625f, -0.008461721241474151611328125f,
0.01383177936077117919921875f, 0.0117270611226558685302734375f,
-0.0164460353553295135498046875f, 0.0585579685866832733154296875f,
0.02038039825856685638427734375f, -0.0209107734262943267822265625f,
0.01046995259821414947509765625f, -0.09019653499126434326171875f,
-0.0583711564540863037109375f};
{0.4813065826892852783203125f, -0.0246877372264862060546875f,
0.04095232486724853515625f, -0.0401695556938648223876953125f,
0.00500857271254062652587890625f, 0.0160773508250713348388671875f,
-0.011385642923414707183837890625f, -0.008461721241474151611328125f,
0.01383177936077117919921875f, 0.0117270611226558685302734375f,
-0.0164460353553295135498046875f, 0.0585579685866832733154296875f,
0.02038039825856685638427734375f, -0.0209107734262943267822265625f,
0.01046995259821414947509765625f, -0.09019653499126434326171875f,
-0.0583711564540863037109375f}};
constexpr std::array<float, 17> expected_imag = {
0.f,
-0.010482530109584331512451171875f,
0.04762755334377288818359375f,
-0.0558677613735198974609375f,
0.007908363826572895050048828125f,
-0.0071932487189769744873046875f,
0.01322011835873126983642578125f,
-0.011227893643081188201904296875f,
-0.0400779247283935546875f,
-0.0290451310575008392333984375f,
0.01519204117357730865478515625f,
-0.09711246192455291748046875f,
-0.00136523949913680553436279296875f,
0.038602568209171295166015625f,
-0.009693108499050140380859375f,
-0.0183933563530445098876953125f,
0.f};
{0.f, -0.010482530109584331512451171875f, 0.04762755334377288818359375f,
-0.0558677613735198974609375f, 0.007908363826572895050048828125f,
-0.0071932487189769744873046875f, 0.01322011835873126983642578125f,
-0.011227893643081188201904296875f, -0.0400779247283935546875f,
-0.0290451310575008392333984375f, 0.01519204117357730865478515625f,
-0.09711246192455291748046875f, -0.00136523949913680553436279296875f,
0.038602568209171295166015625f, -0.009693108499050140380859375f,
-0.0183933563530445098876953125f, 0.f}};
KissFft fft(32);
std::array<std::complex<float>, 32> fft_buf_in;
......
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