Lines Matching refs:output

25 	DSP_DATA q15_t *output;  in test_zdsp_add_q15()  local
28 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_add_q15()
29 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q15()
32 zdsp_add_q15(input1, input2, output, length); in test_zdsp_add_q15()
36 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q15()
40 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_add_q15()
44 free(output); in test_zdsp_add_q15()
60 DSP_DATA q15_t *output; in test_zdsp_add_q15_in_place() local
63 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_add_q15_in_place()
64 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q15_in_place()
67 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_add_q15_in_place()
70 zdsp_add_q15(output, input2, output, length); in test_zdsp_add_q15_in_place()
73 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q15_in_place()
76 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_add_q15_in_place()
80 free(output); in test_zdsp_add_q15_in_place()
97 DSP_DATA q15_t *output; in test_zdsp_sub_q15() local
100 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_sub_q15()
101 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_sub_q15()
104 zdsp_sub_q15(input1, input2, output, length); in test_zdsp_sub_q15()
108 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q15()
112 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_sub_q15()
116 free(output); in test_zdsp_sub_q15()
132 DSP_DATA q15_t *output; in test_zdsp_sub_q15_in_place() local
135 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_sub_q15_in_place()
136 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_sub_q15_in_place()
139 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_sub_q15_in_place()
142 zdsp_sub_q15(output, input2, output, length); in test_zdsp_sub_q15_in_place()
145 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q15_in_place()
148 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_sub_q15_in_place()
152 free(output); in test_zdsp_sub_q15_in_place()
169 DSP_DATA q15_t *output; in test_zdsp_mult_q15() local
172 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_mult_q15()
173 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_mult_q15()
176 zdsp_mult_q15(input1, input2, output, length); in test_zdsp_mult_q15()
180 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH_HIGH), in test_zdsp_mult_q15()
184 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_mult_q15()
188 free(output); in test_zdsp_mult_q15()
202 DSP_DATA q15_t *output; in test_zdsp_mult_q15_in_place() local
205 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_mult_q15_in_place()
206 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_mult_q15_in_place()
209 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_mult_q15_in_place()
212 zdsp_mult_q15(output, input2, output, length); in test_zdsp_mult_q15_in_place()
215 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH_HIGH), in test_zdsp_mult_q15_in_place()
218 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_mult_q15_in_place()
222 free(output); in test_zdsp_mult_q15_in_place()
236 DSP_DATA q15_t *output; in test_zdsp_negate_q15() local
239 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_negate_q15()
240 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_negate_q15()
243 zdsp_negate_q15(input1, output, length); in test_zdsp_negate_q15()
247 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q15()
251 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_negate_q15()
255 free(output); in test_zdsp_negate_q15()
268 DSP_DATA q15_t *output; in test_zdsp_negate_q15_in_place() local
271 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_negate_q15_in_place()
272 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_negate_q15_in_place()
275 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_negate_q15_in_place()
278 zdsp_negate_q15(output, output, length); in test_zdsp_negate_q15_in_place()
281 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q15_in_place()
284 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_negate_q15_in_place()
288 free(output); in test_zdsp_negate_q15_in_place()
302 DSP_DATA q15_t *output; in test_zdsp_offset_q15() local
305 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_offset_q15()
306 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_offset_q15()
309 zdsp_offset_q15(input1, scalar, output, length); in test_zdsp_offset_q15()
313 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q15()
317 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_offset_q15()
321 free(output); in test_zdsp_offset_q15()
337 DSP_DATA q15_t *output; in test_zdsp_offset_q15_in_place() local
340 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_offset_q15_in_place()
341 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_offset_q15_in_place()
344 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_offset_q15_in_place()
347 zdsp_offset_q15(output, scalar, output, length); in test_zdsp_offset_q15_in_place()
350 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q15_in_place()
353 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_offset_q15_in_place()
357 free(output); in test_zdsp_offset_q15_in_place()
376 DSP_DATA q15_t *output; in test_zdsp_scale_q15() local
379 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_scale_q15()
380 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_scale_q15()
383 zdsp_scale_q15(input1, scalar, 0, output, length); in test_zdsp_scale_q15()
387 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q15()
391 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_scale_q15()
395 free(output); in test_zdsp_scale_q15()
409 DSP_DATA q15_t *output; in test_zdsp_scale_q15_in_place() local
412 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_scale_q15_in_place()
413 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_scale_q15_in_place()
416 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_scale_q15_in_place()
419 zdsp_scale_q15(output, scalar, 0, output, length); in test_zdsp_scale_q15_in_place()
422 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q15_in_place()
425 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_scale_q15_in_place()
429 free(output); in test_zdsp_scale_q15_in_place()
446 DSP_DATA q63_t *output; in test_zdsp_dot_prod_q15() local
449 output = (DSP_DATA q63_t *)malloc(1 * sizeof(q63_t)); in test_zdsp_dot_prod_q15()
450 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_dot_prod_q15()
453 zdsp_dot_prod_q15(input1, input2, length, &output[0]); in test_zdsp_dot_prod_q15()
457 test_snr_error_q63(1, output, ref, SNR_ERROR_THRESH_HIGH), in test_zdsp_dot_prod_q15()
461 test_near_equal_q63(1, output, ref, ABS_ERROR_THRESH_Q63), in test_zdsp_dot_prod_q15()
465 free(output); in test_zdsp_dot_prod_q15()
477 DSP_DATA q15_t *output; in test_zdsp_abs_q15() local
480 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_abs_q15()
481 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_abs_q15()
484 zdsp_abs_q15(input1, output, length); in test_zdsp_abs_q15()
488 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q15()
492 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_abs_q15()
496 free(output); in test_zdsp_abs_q15()
507 DSP_DATA q15_t *output; in test_zdsp_abs_q15_in_place() local
510 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_abs_q15_in_place()
511 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_abs_q15_in_place()
514 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_abs_q15_in_place()
517 zdsp_abs_q15(output, output, length); in test_zdsp_abs_q15_in_place()
520 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q15_in_place()
523 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_abs_q15_in_place()
527 free(output); in test_zdsp_abs_q15_in_place()
539 DSP_DATA q15_t *output; in test_zdsp_shift_q15() local
542 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_shift_q15()
543 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_shift_q15()
546 zdsp_shift_q15(input1, 1, output, length); in test_zdsp_shift_q15()
550 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q15()
554 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_shift_q15()
558 free(output); in test_zdsp_shift_q15()
568 DSP_DATA q15_t *output; in test_zdsp_shift_q15_in_place() local
571 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_shift_q15_in_place()
572 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_shift_q15_in_place()
575 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_shift_q15_in_place()
578 zdsp_shift_q15(output, 1, output, length); in test_zdsp_shift_q15_in_place()
581 zassert_true(test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q15_in_place()
584 zassert_true(test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_shift_q15_in_place()
588 free(output); in test_zdsp_shift_q15_in_place()
601 DSP_DATA uint16_t *output; in test_zdsp_and_u16() local
604 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_and_u16()
605 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_and_u16()
608 zdsp_and_u16(input1, input2, output, length); in test_zdsp_and_u16()
612 test_equal_q15(length, output, ref), in test_zdsp_and_u16()
616 free(output); in test_zdsp_and_u16()
627 DSP_DATA uint16_t *output; in test_zdsp_and_u16_in_place() local
630 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_and_u16_in_place()
631 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_and_u16_in_place()
634 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_and_u16_in_place()
637 zdsp_and_u16(output, input2, output, length); in test_zdsp_and_u16_in_place()
640 zassert_true(test_equal_q15(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_and_u16_in_place()
643 free(output); in test_zdsp_and_u16_in_place()
657 DSP_DATA uint16_t *output; in test_zdsp_or_u16() local
660 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_or_u16()
661 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_or_u16()
664 zdsp_or_u16(input1, input2, output, length); in test_zdsp_or_u16()
668 test_equal_q15(length, output, ref), in test_zdsp_or_u16()
672 free(output); in test_zdsp_or_u16()
683 DSP_DATA uint16_t *output; in test_zdsp_or_u16_in_place() local
686 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_or_u16_in_place()
687 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_or_u16_in_place()
690 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_or_u16_in_place()
693 zdsp_or_u16(output, input2, output, length); in test_zdsp_or_u16_in_place()
696 zassert_true(test_equal_q15(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_or_u16_in_place()
699 free(output); in test_zdsp_or_u16_in_place()
711 DSP_DATA uint16_t *output; in test_zdsp_not_u16() local
714 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_not_u16()
715 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_not_u16()
718 zdsp_not_u16(input1, output, length); in test_zdsp_not_u16()
722 test_equal_q15(length, output, ref), in test_zdsp_not_u16()
726 free(output); in test_zdsp_not_u16()
736 DSP_DATA uint16_t *output; in test_zdsp_not_u16_in_place() local
739 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_not_u16_in_place()
740 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_not_u16_in_place()
743 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_not_u16_in_place()
746 zdsp_not_u16(output, output, length); in test_zdsp_not_u16_in_place()
749 zassert_true(test_equal_q15(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_not_u16_in_place()
752 free(output); in test_zdsp_not_u16_in_place()
763 DSP_DATA uint16_t *output; in test_zdsp_xor_u16() local
766 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_xor_u16()
767 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_xor_u16()
770 zdsp_xor_u16(input1, input2, output, length); in test_zdsp_xor_u16()
774 test_equal_q15(length, output, ref), in test_zdsp_xor_u16()
778 free(output); in test_zdsp_xor_u16()
789 DSP_DATA uint16_t *output; in test_zdsp_xor_u16_in_place() local
792 output = (DSP_DATA q15_t *)malloc(length * sizeof(uint16_t)); in test_zdsp_xor_u16_in_place()
793 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_xor_u16_in_place()
796 memcpy(output, input1, length * sizeof(q15_t)); in test_zdsp_xor_u16_in_place()
799 zdsp_xor_u16(output, input2, output, length); in test_zdsp_xor_u16_in_place()
802 zassert_true(test_equal_q15(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_xor_u16_in_place()
805 free(output); in test_zdsp_xor_u16_in_place()
818 DSP_DATA q15_t *output; in test_zdsp_clip_q15() local
821 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_clip_q15()
822 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_clip_q15()
825 zdsp_clip_q15(input, output, min, max, length); in test_zdsp_clip_q15()
829 test_equal_q15(length, output, ref), in test_zdsp_clip_q15()
833 free(output); in test_zdsp_clip_q15()
846 DSP_DATA q15_t *output; in test_zdsp_clip_q15_in_place() local
849 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_clip_q15_in_place()
850 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_clip_q15_in_place()
853 memcpy(output, input, length * sizeof(q15_t)); in test_zdsp_clip_q15_in_place()
856 zdsp_clip_q15(output, output, min, max, length); in test_zdsp_clip_q15_in_place()
859 zassert_true(test_equal_q15(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_clip_q15_in_place()
862 free(output); in test_zdsp_clip_q15_in_place()