• Home
  • Raw
  • Download

Lines Matching refs:kBufferFrames

16 static const size_t kBufferFrames = 8192;  variable
18 static const size_t kNumSamples = kBufferFrames * kNumChannels;
30 mix_buffer_ = (int16_t*)malloc(kBufferFrames * 4); in SetUp()
32 calloc(1, kBufferFrames * 4 + sizeof(cras_audio_shm_header))); in SetUp()
34 for (size_t i = 0; i < kBufferFrames * 2; i++) { in SetUp()
39 compare_buffer_ = (int16_t*)malloc(kBufferFrames * 4); in SetUp()
49 for (size_t i = 0; i < kBufferFrames; i++) { in _SetupBuffer()
54 for (size_t i = kBufferFrames; i < kBufferFrames * 2; i++) { in _SetupBuffer()
63 for (size_t i = 0; i < kBufferFrames * 2; i += 2) { in TestScaleStride()
77 (uint8_t*)src_buffer_, kBufferFrames, 4, 2, in TestScaleStride()
80 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TestScaleStride()
85 for (size_t i = 0; i < kBufferFrames * 2; i++) { in ScaleIncrement()
113 EXPECT_EQ(0, memcmp(mix_buffer_, src_buffer_, kBufferFrames * 4)); in TEST_F()
122 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
124 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * 4)); in TEST_F()
130 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
135 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
137 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * 4)); in TEST_F()
144 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
146 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * 4)); in TEST_F()
153 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
155 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * 4)); in TEST_F()
162 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
164 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * 4)); in TEST_F()
173 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
175 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * 4)); in TEST_F()
186 memcpy(compare_buffer_, src_buffer_, kBufferFrames * 4); in TEST_F()
187 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
190 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
201 memset(compare_buffer_, 0, kBufferFrames * 4); in TEST_F()
202 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
205 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
217 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
219 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
231 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
234 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
246 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
249 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
261 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
264 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
276 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
278 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
290 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
292 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
296 memcpy(compare_buffer_, src_buffer_, kBufferFrames * 4); in TEST_F()
299 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * 4)); in TEST_F()
303 memset(compare_buffer_, 0, kBufferFrames * 4); in TEST_F()
306 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * 4)); in TEST_F()
310 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
314 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * 4)); in TEST_F()
328 mix_buffer_ = (int32_t*)malloc(kBufferFrames * fr_bytes_); in SetUp()
330 calloc(1, kBufferFrames * fr_bytes_ + sizeof(cras_audio_shm_header))); in SetUp()
332 for (size_t i = 0; i < kBufferFrames * 2; i++) { in SetUp()
337 compare_buffer_ = (int32_t*)malloc(kBufferFrames * fr_bytes_); in SetUp()
347 for (size_t i = 0; i < kBufferFrames; i++) { in _SetupBuffer()
352 for (size_t i = kBufferFrames; i < kBufferFrames * 2; i++) { in _SetupBuffer()
361 for (size_t i = 0; i < kBufferFrames * 2; i += 2) { in TestScaleStride()
375 (uint8_t*)src_buffer_, kBufferFrames, 8, 4, in TestScaleStride()
378 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 8)); in TestScaleStride()
384 for (size_t i = 0; i < kBufferFrames * 2; i++) { in ScaleIncrement()
419 EXPECT_EQ(0, memcmp(mix_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
428 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
430 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
436 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
441 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
443 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
450 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
452 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
459 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
461 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
468 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
470 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
479 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
481 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
492 memcpy(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_); in TEST_F()
493 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
496 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
507 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in TEST_F()
508 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
511 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
523 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
525 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
537 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
540 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
552 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
555 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
567 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
570 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
582 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
584 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
596 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
598 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
602 memcpy(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_); in TEST_F()
605 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
609 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in TEST_F()
612 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
616 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
620 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
634 mix_buffer_ = (int32_t*)malloc(kBufferFrames * fr_bytes_); in SetUp()
636 calloc(1, kBufferFrames * fr_bytes_ + sizeof(cras_audio_shm_header))); in SetUp()
638 for (size_t i = 0; i < kBufferFrames * 2; i++) { in SetUp()
643 compare_buffer_ = (int32_t*)malloc(kBufferFrames * fr_bytes_); in SetUp()
653 for (size_t i = 0; i < kBufferFrames; i++) { in _SetupBuffer()
658 for (size_t i = kBufferFrames; i < kBufferFrames * 2; i++) { in _SetupBuffer()
667 for (size_t i = 0; i < kBufferFrames * 2; i += 2) { in TestScaleStride()
681 (uint8_t*)src_buffer_, kBufferFrames, 8, 4, in TestScaleStride()
684 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 8)); in TestScaleStride()
690 for (size_t i = 0; i < kBufferFrames * 2; i++) { in ScaleIncrement()
719 EXPECT_EQ(0, memcmp(mix_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
728 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
730 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
736 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
741 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
743 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
750 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
752 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
759 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
761 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
768 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
770 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
779 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
781 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
792 memcpy(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_); in TEST_F()
793 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
796 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
807 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in TEST_F()
808 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
811 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
823 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
825 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
837 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
840 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
852 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
855 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
867 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
870 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
882 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
884 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
896 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
898 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
902 memcpy(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_); in TEST_F()
905 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
909 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in TEST_F()
912 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
916 for (size_t i = 0; i < kBufferFrames * 2; i++) in TEST_F()
920 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
934 mix_buffer_ = (uint8_t*)malloc(kBufferFrames * fr_bytes_); in SetUp()
936 calloc(1, kBufferFrames * fr_bytes_ + sizeof(cras_audio_shm_header))); in SetUp()
938 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in SetUp()
944 compare_buffer_ = (uint8_t*)malloc(kBufferFrames * fr_bytes_); in SetUp()
954 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in _SetupBuffer()
955 for (size_t i = 0; i < kBufferFrames; i++) { in _SetupBuffer()
961 for (size_t i = kBufferFrames; i < kBufferFrames * 2; i++) { in _SetupBuffer()
971 for (size_t i = 0; i < kBufferFrames * kNumChannels; i += 2) { in TestScaleStride()
990 (uint8_t*)src_buffer_, kBufferFrames, 6, 3, in TestScaleStride()
993 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 6)); in TestScaleStride()
999 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in ScaleIncrement()
1032 EXPECT_EQ(0, memcmp(mix_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1041 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in TEST_F()
1047 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1053 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in TEST_F()
1060 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in TEST_F()
1064 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1071 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) in TEST_F()
1073 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1080 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) in TEST_F()
1082 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1089 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in TEST_F()
1095 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1104 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in TEST_F()
1111 EXPECT_EQ(0, memcmp(mix_buffer_, compare_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1122 memcpy(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_); in TEST_F()
1123 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1126 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1137 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in TEST_F()
1138 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1141 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1153 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1155 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1167 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1170 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1182 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1185 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
1197 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1200 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * 4)); in TEST_F()
1212 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1214 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1226 cras_scale_buffer_increment(fmt_, (uint8_t*)mix_buffer_, kBufferFrames, in TEST_F()
1228 EXPECT_EQ(0, memcmp(compare_buffer_, mix_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1232 memcpy(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_); in TEST_F()
1235 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1239 memset(compare_buffer_, 0, kBufferFrames * fr_bytes_); in TEST_F()
1242 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()
1246 for (size_t i = 0; i < kBufferFrames * kNumChannels; i++) { in TEST_F()
1254 EXPECT_EQ(0, memcmp(compare_buffer_, src_buffer_, kBufferFrames * fr_bytes_)); in TEST_F()