Home | History | Annotate | Download | only in tests

Lines Matching refs:length

29 void testFloatValue(float f_value, size_t length) {
31 float f_ary[length];
32 uint8_t u8_ary[length];
33 int16_t i16_ary[length];
34 int32_t i32_ary[length];
35 int32_t q8_23_ary[length];
36 uint8x3_t p24_ary[length];
60 for (size_t i = 0; i < length; ++i) {
71 if (i >= length) break;
73 audio_utils_compute_power_mono(f_ary + i, AUDIO_FORMAT_PCM_FLOAT, length - i));
75 audio_utils_compute_power_mono(u8_ary + i, AUDIO_FORMAT_PCM_8_BIT, length - i));
77 audio_utils_compute_power_mono(i16_ary + i, AUDIO_FORMAT_PCM_16_BIT, length - i));
79 audio_utils_compute_power_mono(i32_ary + i, AUDIO_FORMAT_PCM_32_BIT, length - i));
82 q8_23_ary + i, AUDIO_FORMAT_PCM_8_24_BIT, length - i));
85 p24_ary + i, AUDIO_FORMAT_PCM_24_BIT_PACKED, length - i));
89 void testFloatRamp(size_t length) {
90 float f_ary[length];
91 uint8_t u8_ary[length];
92 int16_t i16_ary[length];
93 int32_t i32_ary[length];
94 int32_t q8_23_ary[length];
95 uint8x3_t p24_ary[length];
97 for (size_t i = 0; i < length; ++i) {
99 const float f_value = (int(length & 0xff) - 128) / 128.f;
131 const float power8 = audio_utils_compute_power_mono(u8_ary, AUDIO_FORMAT_PCM_8_BIT, length);
134 audio_utils_compute_power_mono(f_ary, AUDIO_FORMAT_PCM_FLOAT, length));
136 audio_utils_compute_power_mono(i16_ary, AUDIO_FORMAT_PCM_16_BIT, length));
138 audio_utils_compute_power_mono(i32_ary, AUDIO_FORMAT_PCM_32_BIT, length));
140 audio_utils_compute_power_mono(q8_23_ary, AUDIO_FORMAT_PCM_8_24_BIT, length));
142 audio_utils_compute_power_mono(p24_ary, AUDIO_FORMAT_PCM_24_BIT_PACKED, length));
152 for (size_t length : { 1, 3, 5, 7, 16, 21, 32, 37 }) {
153 testFloatValue(f_value, length);
160 for (size_t length : { 1, 3, 5, 7, 16, 21, 32, 37, 297 }) {
161 testFloatRamp(length);