Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 5 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /* ---------------------------------------------------------------------- |
1 | /* ---------------------------------------------------------------------- |
| 2 | * Copyright (C) 2010-2014 ARM Limited. All rights reserved. |
2 | * Copyright (C) 2010-2014 ARM Limited. All rights reserved. |
| 3 | * |
3 | * |
| 4 | * $Date: 19. March 2015 |
4 | * $Date: 19. October 2015 |
| 5 | * $Revision: V.1.4.5 |
5 | * $Revision: V.1.4.5 a |
| 6 | * |
6 | * |
| 7 | * Project: CMSIS DSP Library |
7 | * Project: CMSIS DSP Library |
| 8 | * Title: arm_cmplx_mult_real_q15.c |
8 | * Title: arm_cmplx_mult_real_q15.c |
| 9 | * |
9 | * |
| 10 | * Description: Q15 complex by real multiplication |
10 | * Description: Q15 complex by real multiplication |
| Line 110... | Line 110... | ||
| 110 | mul2 = (q31_t) ((q15_t) (inA1 >> 16) * (q15_t) (inB1 >> 16)); |
110 | mul2 = (q31_t) ((q15_t) (inA1 >> 16) * (q15_t) (inB1 >> 16)); |
| 111 | mul1 = (q31_t) ((q15_t) inA1 * (q15_t) (inB1 >> 16)); |
111 | mul1 = (q31_t) ((q15_t) inA1 * (q15_t) (inB1 >> 16)); |
| 112 | mul4 = (q31_t) ((q15_t) (inA2 >> 16) * (q15_t) inB1); |
112 | mul4 = (q31_t) ((q15_t) (inA2 >> 16) * (q15_t) inB1); |
| 113 | mul3 = (q31_t) ((q15_t) inA2 * (q15_t) inB1); |
113 | mul3 = (q31_t) ((q15_t) inA2 * (q15_t) inB1); |
| 114 | 114 | ||
| 115 | #endif // #ifndef ARM_MATH_BIG_ENDIAN |
115 | #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ |
| 116 | 116 | ||
| 117 | /* saturate the result */ |
117 | /* saturate the result */ |
| 118 | out1 = (q15_t) __SSAT(mul1 >> 15u, 16); |
118 | out1 = (q15_t) __SSAT(mul1 >> 15u, 16); |
| 119 | out2 = (q15_t) __SSAT(mul2 >> 15u, 16); |
119 | out2 = (q15_t) __SSAT(mul2 >> 15u, 16); |
| 120 | out3 = (q15_t) __SSAT(mul3 >> 15u, 16); |
120 | out3 = (q15_t) __SSAT(mul3 >> 15u, 16); |
| Line 140... | Line 140... | ||
| 140 | mul2 = (q31_t) ((q15_t) (inA1 >> 16) * (q15_t) (inB1 >> 16)); |
140 | mul2 = (q31_t) ((q15_t) (inA1 >> 16) * (q15_t) (inB1 >> 16)); |
| 141 | mul1 = (q31_t) ((q15_t) inA1 * (q15_t) (inB1 >> 16)); |
141 | mul1 = (q31_t) ((q15_t) inA1 * (q15_t) (inB1 >> 16)); |
| 142 | mul4 = (q31_t) ((q15_t) (inA2 >> 16) * (q15_t) inB1); |
142 | mul4 = (q31_t) ((q15_t) (inA2 >> 16) * (q15_t) inB1); |
| 143 | mul3 = (q31_t) ((q15_t) inA2 * (q15_t) inB1); |
143 | mul3 = (q31_t) ((q15_t) inA2 * (q15_t) inB1); |
| 144 | 144 | ||
| 145 | #endif // #ifndef ARM_MATH_BIG_ENDIAN |
145 | #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ |
| 146 | 146 | ||
| 147 | out1 = (q15_t) __SSAT(mul1 >> 15u, 16); |
147 | out1 = (q15_t) __SSAT(mul1 >> 15u, 16); |
| 148 | out2 = (q15_t) __SSAT(mul2 >> 15u, 16); |
148 | out2 = (q15_t) __SSAT(mul2 >> 15u, 16); |
| 149 | out3 = (q15_t) __SSAT(mul3 >> 15u, 16); |
149 | out3 = (q15_t) __SSAT(mul3 >> 15u, 16); |
| 150 | out4 = (q15_t) __SSAT(mul4 >> 15u, 16); |
150 | out4 = (q15_t) __SSAT(mul4 >> 15u, 16); |