Lines Matching refs:output

23 	DSP_DATA q31_t *output;  in test_zdsp_add_q31()  local
26 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_add_q31()
27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q31()
30 zdsp_add_q31(input1, input2, output, length); in test_zdsp_add_q31()
34 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q31()
38 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_add_q31()
42 free(output); in test_zdsp_add_q31()
56 DSP_DATA q31_t *output; in test_zdsp_add_q31_in_place() local
59 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_add_q31_in_place()
60 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q31_in_place()
63 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_add_q31_in_place()
66 zdsp_add_q31(output, input2, output, length); in test_zdsp_add_q31_in_place()
69 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q31_in_place()
72 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_add_q31_in_place()
76 free(output); in test_zdsp_add_q31_in_place()
92 DSP_DATA q31_t *output; in test_zdsp_sub_q31() local
95 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_sub_q31()
96 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_sub_q31()
99 zdsp_sub_q31(input1, input2, output, length); in test_zdsp_sub_q31()
103 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q31()
107 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_sub_q31()
111 free(output); in test_zdsp_sub_q31()
125 DSP_DATA q31_t *output; in test_zdsp_sub_q31_in_place() local
128 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_sub_q31_in_place()
129 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_sub_q31_in_place()
132 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_sub_q31_in_place()
135 zdsp_sub_q31(output, input2, output, length); in test_zdsp_sub_q31_in_place()
138 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q31_in_place()
141 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_sub_q31_in_place()
145 free(output); in test_zdsp_sub_q31_in_place()
161 DSP_DATA q31_t *output; in test_zdsp_mult_q31() local
164 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_mult_q31()
165 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_mult_q31()
168 zdsp_mult_q31(input1, input2, output, length); in test_zdsp_mult_q31()
172 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_mult_q31()
176 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_mult_q31()
180 free(output); in test_zdsp_mult_q31()
194 DSP_DATA q31_t *output; in test_zdsp_mult_q31_in_place() local
197 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_mult_q31_in_place()
198 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_mult_q31_in_place()
201 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_mult_q31_in_place()
204 zdsp_mult_q31(output, input2, output, length); in test_zdsp_mult_q31_in_place()
207 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_mult_q31_in_place()
210 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_mult_q31_in_place()
214 free(output); in test_zdsp_mult_q31_in_place()
227 DSP_DATA q31_t *output; in test_zdsp_negate_q31() local
230 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_negate_q31()
231 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_negate_q31()
234 zdsp_negate_q31(input1, output, length); in test_zdsp_negate_q31()
238 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q31()
242 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_negate_q31()
246 free(output); in test_zdsp_negate_q31()
259 DSP_DATA q31_t *output; in test_zdsp_negate_q31_in_place() local
262 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_negate_q31_in_place()
263 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_negate_q31_in_place()
266 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_negate_q31_in_place()
269 zdsp_negate_q31(output, output, length); in test_zdsp_negate_q31_in_place()
272 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q31_in_place()
275 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_negate_q31_in_place()
279 free(output); in test_zdsp_negate_q31_in_place()
293 DSP_DATA q31_t *output; in test_zdsp_offset_q31() local
296 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_offset_q31()
297 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_offset_q31()
300 zdsp_offset_q31(input1, scalar, output, length); in test_zdsp_offset_q31()
304 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q31()
308 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_offset_q31()
312 free(output); in test_zdsp_offset_q31()
328 DSP_DATA q31_t *output; in test_zdsp_offset_q31_in_place() local
331 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_offset_q31_in_place()
332 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_offset_q31_in_place()
335 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_offset_q31_in_place()
338 zdsp_offset_q31(output, scalar, output, length); in test_zdsp_offset_q31_in_place()
341 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q31_in_place()
344 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_offset_q31_in_place()
348 free(output); in test_zdsp_offset_q31_in_place()
367 DSP_DATA q31_t *output; in test_zdsp_scale_q31() local
370 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_scale_q31()
371 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_scale_q31()
374 zdsp_scale_q31(input1, scalar, 0, output, length); in test_zdsp_scale_q31()
378 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q31()
382 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_scale_q31()
386 free(output); in test_zdsp_scale_q31()
400 DSP_DATA q31_t *output; in test_zdsp_scale_q31_in_place() local
403 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_scale_q31_in_place()
404 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_scale_q31_in_place()
407 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_scale_q31_in_place()
410 zdsp_scale_q31(output, scalar, 0, output, length); in test_zdsp_scale_q31_in_place()
413 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q31_in_place()
416 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_scale_q31_in_place()
420 free(output); in test_zdsp_scale_q31_in_place()
437 DSP_DATA q63_t *output; in test_zdsp_dot_prod_q31() local
440 output = (DSP_DATA q63_t *)malloc(length * sizeof(q63_t)); in test_zdsp_dot_prod_q31()
441 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_dot_prod_q31()
444 zdsp_dot_prod_q31(input1, input2, length, &output[0]); in test_zdsp_dot_prod_q31()
448 test_snr_error_q63(1, output, ref, SNR_ERROR_THRESH), in test_zdsp_dot_prod_q31()
452 test_near_equal_q63(1, output, ref, ABS_ERROR_THRESH_Q63), in test_zdsp_dot_prod_q31()
456 free(output); in test_zdsp_dot_prod_q31()
467 DSP_DATA q31_t *output; in test_zdsp_abs_q31() local
470 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_abs_q31()
471 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_abs_q31()
474 zdsp_abs_q31(input1, output, length); in test_zdsp_abs_q31()
478 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q31()
482 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_abs_q31()
486 free(output); in test_zdsp_abs_q31()
497 DSP_DATA q31_t *output; in test_zdsp_abs_q31_in_place() local
500 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_abs_q31_in_place()
501 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_abs_q31_in_place()
504 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_abs_q31_in_place()
507 zdsp_abs_q31(output, output, length); in test_zdsp_abs_q31_in_place()
510 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q31_in_place()
513 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_abs_q31_in_place()
517 free(output); in test_zdsp_abs_q31_in_place()
528 DSP_DATA q31_t *output; in test_zdsp_shift_q31() local
531 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_shift_q31()
532 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_shift_q31()
535 zdsp_shift_q31(input1, 1, output, length); in test_zdsp_shift_q31()
539 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q31()
543 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_shift_q31()
547 free(output); in test_zdsp_shift_q31()
557 DSP_DATA q31_t *output; in test_zdsp_shift_q31_in_place() local
560 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_shift_q31_in_place()
561 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_shift_q31_in_place()
564 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_shift_q31_in_place()
567 zdsp_shift_q31(output, 1, output, length); in test_zdsp_shift_q31_in_place()
570 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q31_in_place()
573 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_shift_q31_in_place()
577 free(output); in test_zdsp_shift_q31_in_place()
589 DSP_DATA uint32_t *output; in test_zdsp_and_u32() local
592 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_and_u32()
593 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_and_u32()
596 zdsp_and_u32(input1, input2, output, length); in test_zdsp_and_u32()
600 test_equal_q31(length, output, ref), in test_zdsp_and_u32()
604 free(output); in test_zdsp_and_u32()
614 DSP_DATA uint32_t *output; in test_zdsp_and_u32_in_place() local
617 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_and_u32_in_place()
618 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_and_u32_in_place()
621 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_and_u32_in_place()
624 zdsp_and_u32(output, input2, output, length); in test_zdsp_and_u32_in_place()
627 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_and_u32_in_place()
630 free(output); in test_zdsp_and_u32_in_place()
643 DSP_DATA uint32_t *output; in test_zdsp_or_u32() local
646 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_or_u32()
647 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_or_u32()
650 zdsp_or_u32(input1, input2, output, length); in test_zdsp_or_u32()
654 test_equal_q31(length, output, ref), in test_zdsp_or_u32()
658 free(output); in test_zdsp_or_u32()
668 DSP_DATA uint32_t *output; in test_zdsp_or_u32_in_place() local
671 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_or_u32_in_place()
672 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_or_u32_in_place()
675 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_or_u32_in_place()
678 zdsp_or_u32(output, input2, output, length); in test_zdsp_or_u32_in_place()
681 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_or_u32_in_place()
684 free(output); in test_zdsp_or_u32_in_place()
694 DSP_DATA uint32_t *output; in test_zdsp_not_u32() local
697 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_not_u32()
698 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_not_u32()
701 zdsp_not_u32(input1, output, length); in test_zdsp_not_u32()
705 test_equal_q31(length, output, ref), in test_zdsp_not_u32()
709 free(output); in test_zdsp_not_u32()
719 DSP_DATA uint32_t *output; in test_zdsp_not_u32_in_place() local
722 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_not_u32_in_place()
723 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_not_u32_in_place()
726 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_not_u32_in_place()
729 zdsp_not_u32(output, output, length); in test_zdsp_not_u32_in_place()
732 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_not_u32_in_place()
735 free(output); in test_zdsp_not_u32_in_place()
745 DSP_DATA uint32_t *output; in test_zdsp_xor_u32() local
748 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_xor_u32()
749 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_xor_u32()
752 zdsp_xor_u32(input1, input2, output, length); in test_zdsp_xor_u32()
756 test_equal_q31(length, output, ref), in test_zdsp_xor_u32()
760 free(output); in test_zdsp_xor_u32()
770 DSP_DATA uint32_t *output; in test_zdsp_xor_u32_in_place() local
773 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_xor_u32_in_place()
774 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_xor_u32_in_place()
777 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_xor_u32_in_place()
780 zdsp_xor_u32(output, input2, output, length); in test_zdsp_xor_u32_in_place()
783 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_xor_u32_in_place()
786 free(output); in test_zdsp_xor_u32_in_place()
799 DSP_DATA q31_t *output; in test_zdsp_clip_q31() local
802 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_clip_q31()
803 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_clip_q31()
806 zdsp_clip_q31(input, output, min, max, length); in test_zdsp_clip_q31()
810 test_equal_q31(length, output, ref), in test_zdsp_clip_q31()
814 free(output); in test_zdsp_clip_q31()
827 DSP_DATA q31_t *output; in test_zdsp_clip_q31_in_place() local
830 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_clip_q31_in_place()
831 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_clip_q31_in_place()
834 memcpy(output, input, length * sizeof(q31_t)); in test_zdsp_clip_q31_in_place()
837 zdsp_clip_q31(output, output, min, max, length); in test_zdsp_clip_q31_in_place()
840 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_clip_q31_in_place()
843 free(output); in test_zdsp_clip_q31_in_place()