Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | #include "ref.h" |
2 | |||
3 | |||
4 | ;/* |
||
5 | ;* @brief In-place bit reversal function. |
||
6 | ;* @param[in, out] *pSrc points to the in-place buffer of unknown 32-bit data type. |
||
7 | ;* @param[in] bitRevLen bit reversal table length |
||
8 | ;* @param[in] *pBitRevTab points to bit reversal table. |
||
9 | ;* @return none. |
||
10 | ;*/ |
||
11 | void arm_bitreversal_32(uint32_t *pSrc, uint32_t bitRevLen, uint32_t *pBitRevTab) |
||
12 | { |
||
13 | uint32_t a,b,i,tmp; |
||
14 | |||
15 | for(i=0; i<bitRevLen; i++) |
||
16 | { |
||
17 | a = pBitRevTab[2*i]; |
||
18 | b = pBitRevTab[2*i + 1]; |
||
19 | |||
20 | //real |
||
21 | tmp = pSrc[a]; |
||
22 | pSrc[a] = pSrc[b]; |
||
23 | pSrc[b] = tmp; |
||
24 | |||
25 | //complex |
||
26 | tmp = pSrc[a+1]; |
||
27 | pSrc[a+1] = pSrc[b+1]; |
||
28 | pSrc[b+1] = tmp; |
||
29 | } |
||
30 | } |