Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "arm_math.h"
00025
00057 void arm_q7_to_q31(
00058 q7_t * pSrc,
00059 q31_t * pDst,
00060 uint32_t blockSize)
00061 {
00062 q7_t *pIn = pSrc;
00063 uint32_t blkCnt;
00064 q31_t out1, out2, out3, out4;
00065 q31_t input1, input2;
00066
00067
00068 blkCnt = blockSize >> 3u;
00069
00070
00071
00072 while(blkCnt > 0u)
00073 {
00074
00075
00076
00077
00078 input1 = *__SIMD32(pIn)++;
00079 input2 = *__SIMD32(pIn)++;
00080
00081
00082 out1 = (input1 >> 24) << 24;
00083 out2 = (input1 >> 16) << 24;
00084 out3 = (input1 >> 8) << 24;
00085 out4 = (input1 << 24);
00086
00087
00088 #ifndef ARM_MATH_BIG_ENDIAN
00089
00090 pDst[3] = out1;
00091 pDst[2] = out2;
00092 pDst[1] = out3;
00093 pDst[0] = out4;
00094
00095 #else
00096
00097 pDst[0] = out1;
00098 pDst[1] = out2;
00099 pDst[2] = out3;
00100 pDst[3] = out4;
00101
00102 #endif // #ifndef ARM_MATH_BIG_ENDIAN
00103
00104
00105 out1 = (input2 >> 24) << 24;
00106 out2 = (input2 >> 16) << 24;
00107 out3 = (input2 >> 8) << 24;
00108 out4 = (input2 << 24);
00109
00110
00111 #ifndef ARM_MATH_BIG_ENDIAN
00112
00113 pDst[7] = out1;
00114 pDst[6] = out2;
00115 pDst[5] = out3;
00116 pDst[4] = out4;
00117
00118 #else
00119
00120 pDst[4] = out1;
00121 pDst[5] = out2;
00122 pDst[6] = out3;
00123 pDst[7] = out4;
00124
00125 #endif // #ifndef ARM_MATH_BIG_ENDIAN
00126
00127 pDst += 8u;
00128
00129
00130 blkCnt--;
00131 }
00132
00133
00134
00135 blkCnt = blockSize % 0x8u;
00136
00137 while(blkCnt > 0u)
00138 {
00139
00140
00141 *pDst++ = (q31_t) * pIn++ << 24;
00142
00143
00144 blkCnt--;
00145 }
00146
00147 }
00148