2 @// Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
4 @// Use of this source code is governed by a BSD-style license
5 @// that can be found in the LICENSE file in the root of the source
6 @// tree. An additional intellectual property rights grant can be found
7 @// in the file PATENTS. All contributing project authors may
8 @// be found in the AUTHORS file in the root of the source tree.
10 @// This is a modification of armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S
11 @// to support float instead of SC32.
16 @// Compute a Radix 2 FFT stage for a N point complex signal
21 @// Include standard headers
23 #include "dl/api/arm/armCOMM_s.h"
24 #include "dl/api/arm/omxtypes_s.h"
26 @// M_VARIANTS ARM1136JS
28 @// Import symbols required from other files
29 @// (For example tables)
34 @// Set debugging level
35 @//DEBUG_ON SETL {TRUE}
39 @// Guarding implementation by the processor name
48 #define pPingPongBuf r5
56 @//Local Scratch Registers
58 #define pDstBuf r3 /*@// Temporarily hold pingpong buffer ptr*/
60 #define outPointStep r12
64 @// Real and Imaginary parts
76 .macro FFTSTAGE scaled, inverse, name
78 @// Update grpCount and grpSize rightaway inorder to reuse pGrpCount
82 lsr grpSize, subFFTNum, #1
83 mov subFFTNum, grpSize
85 @// pT0+1 increments pT0 by 8 bytes
86 @// pT0+pointStep = increment of 8*pointStep bytes = 4*grpSize bytes
87 @// Note: outPointStep = pointStep for firststage
88 @// Note: setCount = grpSize/2 (reuse the updated grpSize for setCount)
89 MOV pointStep,grpSize,LSL #3
93 @// Loop on the sets for grp zero
97 add pSrc, pSrc, pointStep
98 @// {x1r,x1i} = [pSrc, pointStep]
99 vldm.f32 pSrc, {x1r, x1i}
100 sub pSrc, pSrc, pointStep
101 vldm.f32 pSrc!, {x0r, x0i}
103 SUBS setCount,setCount,#1 @// decrement the loop counter
113 add pDst, pDst, outPointStep
114 @// {y1r,y1i} -> [pDst, outPointStep]
115 vstm pDst, {y1r, y1i}
116 sub pDst, pDst, outPointStep
117 vstm pDst!, {y0r, y0i}
119 BGT grpZeroSetLoop\name
122 @// reset pSrc to pDst for the next stage
123 SUB pSrc,pDst,pointStep @// pDst -= 2*grpSize
124 mov pDst, pPingPongBuf
129 M_START armSP_FFTFwd_CToC_FC32_Radix2_fs_OutOfPlace_unsafe_vfp,r4
130 FFTSTAGE "FALSE","FALSE",FWD
133 M_START armSP_FFTInv_CToC_FC32_Radix2_fs_OutOfPlace_unsafe_vfp,r4
134 FFTSTAGE "FALSE","TRUE",INV
138 @/ ENDIF @//ARM1136JS
141 @// Guarding implementation by the processor name