@@ -76,8 +76,9 @@ TF_LITE_MICRO_TEST(FilterbankTest_CheckChannelFrequencyStarts) {
76
76
kSampleRate , kSpectrumSize ));
77
77
78
78
const int16_t expected[] = {0 , 4 , 8 };
79
- TF_LITE_MICRO_EXPECT_EQ (state.num_channels + 1 ,
80
- static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
79
+ TF_LITE_MICRO_EXPECT_EQ (
80
+ state.num_channels + 1 ,
81
+ static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
81
82
int i;
82
83
for (i = 0 ; i <= state.num_channels ; ++i) {
83
84
TF_LITE_MICRO_EXPECT_EQ (state.channel_frequency_starts [i], expected[i]);
@@ -93,8 +94,9 @@ TF_LITE_MICRO_TEST(FilterbankTest_CheckChannelWeightStarts) {
93
94
kSampleRate , kSpectrumSize ));
94
95
95
96
const int16_t expected[] = {0 , 8 , 16 };
96
- TF_LITE_MICRO_EXPECT_EQ (state.num_channels + 1 ,
97
- static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
97
+ TF_LITE_MICRO_EXPECT_EQ (
98
+ state.num_channels + 1 ,
99
+ static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
98
100
int i;
99
101
for (i = 0 ; i <= state.num_channels ; ++i) {
100
102
TF_LITE_MICRO_EXPECT_EQ (state.channel_weight_starts [i], expected[i]);
@@ -110,8 +112,9 @@ TF_LITE_MICRO_TEST(FilterbankTest_CheckChannelWidths) {
110
112
kSampleRate , kSpectrumSize ));
111
113
112
114
const int16_t expected[] = {8 , 8 , 8 };
113
- TF_LITE_MICRO_EXPECT_EQ (state.num_channels + 1 ,
114
- static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
115
+ TF_LITE_MICRO_EXPECT_EQ (
116
+ state.num_channels + 1 ,
117
+ static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
115
118
int i;
116
119
for (i = 0 ; i <= state.num_channels ; ++i) {
117
120
TF_LITE_MICRO_EXPECT_EQ (state.channel_widths [i], expected[i]);
@@ -129,9 +132,10 @@ TF_LITE_MICRO_TEST(FilterbankTest_CheckWeights) {
129
132
const int16_t expected[] = {0 , 3277 , 2217 , 1200 , 222 , 0 , 0 , 0 ,
130
133
0 , 3376 , 2468 , 1591 , 744 , 0 , 0 , 0 ,
131
134
0 , 4020 , 3226 , 2456 , 1708 , 983 , 277 , 0 };
132
- TF_LITE_MICRO_EXPECT_EQ (state.channel_weight_starts [state.num_channels ] +
133
- state.channel_widths [state.num_channels ],
134
- static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
135
+ TF_LITE_MICRO_EXPECT_EQ (
136
+ state.channel_weight_starts [state.num_channels ] +
137
+ state.channel_widths [state.num_channels ],
138
+ static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
135
139
for (size_t i = 0 ; i < sizeof (expected) / sizeof (expected[0 ]); ++i) {
136
140
TF_LITE_MICRO_EXPECT_EQ (state.weights [i], expected[i]);
137
141
}
@@ -148,9 +152,10 @@ TF_LITE_MICRO_TEST(FilterbankTest_CheckUnweights) {
148
152
const int16_t expected[] = {0 , 819 , 1879 , 2896 , 3874 , 0 , 0 , 0 ,
149
153
0 , 720 , 1628 , 2505 , 3352 , 0 , 0 , 0 ,
150
154
0 , 76 , 870 , 1640 , 2388 , 3113 , 3819 , 0 };
151
- TF_LITE_MICRO_EXPECT_EQ (state.channel_weight_starts [state.num_channels ] +
152
- state.channel_widths [state.num_channels ],
153
- static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
155
+ TF_LITE_MICRO_EXPECT_EQ (
156
+ state.channel_weight_starts [state.num_channels ] +
157
+ state.channel_widths [state.num_channels ],
158
+ static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
154
159
for (size_t i = 0 ; i < sizeof (expected) / sizeof (expected[0 ]); ++i) {
155
160
TF_LITE_MICRO_EXPECT_EQ (state.unweights [i], expected[i]);
156
161
}
@@ -204,8 +209,9 @@ TF_LITE_MICRO_TEST(FilterbankTest_CheckSqrt) {
204
209
uint32_t * scaled_filterbank = FilterbankSqrt (&state, kScaleShift );
205
210
206
211
const uint32_t expected[] = {247311 , 508620 };
207
- TF_LITE_MICRO_EXPECT_EQ (state.num_channels ,
208
- static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
212
+ TF_LITE_MICRO_EXPECT_EQ (
213
+ state.num_channels ,
214
+ static_cast <int >(sizeof (expected) / sizeof (expected[0 ])));
209
215
int i;
210
216
for (i = 0 ; i < state.num_channels ; ++i) {
211
217
TF_LITE_MICRO_EXPECT_EQ (scaled_filterbank[i], expected[i]);
0 commit comments