199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Use of this source code is governed by a BSD-style license 599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// that can be found in the LICENSE file in the root of the source 699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// tree. An additional intellectual property rights grant can be found 799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// in the file PATENTS. All contributing project authors may 899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// be found in the AUTHORS file in the root of the source tree. 999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 1099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// This is a modification of armSP_FFT_CToC_SC32_Radix4_ls_unsafe_s.s 1199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// to support float instead of SC32. 1299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 1399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 1499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 1599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Description: 1699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Compute a Radix 4 FFT stage for a N point complex signal 1799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 1899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// 1999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 2099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 2199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Include standard headers 2299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 23bdf981cb383b7ec472ee86d2fedb53937285f894rtoy@google.com#include "dl/api/arm/armCOMM_s.h" 24bdf981cb383b7ec472ee86d2fedb53937285f894rtoy@google.com#include "dl/api/arm/omxtypes_s.h" 2599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 2699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Import symbols required from other files 2799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// (For example tables) 2899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 2999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Set debugging level 3399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//DEBUG_ON SETL {TRUE} 3499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Guarding implementation by the processor name 3799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 3999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Import symbols required from other files 4099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// (For example tables) 4199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @//IMPORT armAAC_constTable 4299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 4399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//Input Registers 4499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 4599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pSrc r0 4699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pDst r2 4799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pTwiddle r1 4899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define subFFTNum r6 4999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define subFFTSize r7 5099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 5199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 5299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 5399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//Output Registers 5499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 5599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 5699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//Local Scratch Registers 5799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 5899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define outPointStep r3 5999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define grpCount r4 6099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dstStep r5 6199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define grpTwStep r8 6299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define stepTwiddle r9 6399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define twStep r10 6499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pTmp r4 6599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define step16 r11 6699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define step24 r12 6799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 6899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 6999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Neon Registers 7099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 7199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly1Real02 D0.F32 7299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly1Imag02 D1.F32 7399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly1Real13 D2.F32 7499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly1Imag13 D3.F32 7599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly2Real02 D4.F32 7699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly2Imag02 D5.F32 7799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly2Real13 D6.F32 7899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dButterfly2Imag13 D7.F32 7999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr0 D0.F32 8099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi0 D1.F32 8199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr1 D2.F32 8299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi1 D3.F32 8399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr2 D4.F32 8499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi2 D5.F32 8599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr3 D6.F32 8699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi3 D7.F32 8799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 8899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr0 D16.F32 8999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi0 D17.F32 9099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr1 D18.F32 9199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi1 D19.F32 9299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr2 D20.F32 9399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi2 D21.F32 9499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr3 D22.F32 9599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi3 D23.F32 9699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 9799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dW1r D8.F32 9899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dW1i D9.F32 9999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dW2r D10.F32 10099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dW2i D11.F32 10199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dW3r D12.F32 10299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dW3i D13.F32 10399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qT0 d14.f32 10499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qT1 d16.F32 10599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qT2 d18.F32 10699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qT3 d20.f32 10799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qT4 d22.f32 10899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qT5 d24.f32 10999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 11099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZr0 D14.F32 11199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZi0 D15.F32 11299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZr1 D26.F32 11399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZi1 D27.F32 11499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZr2 D28.F32 11599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZi2 D29.F32 11699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZr3 D30.F32 11799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dZi3 D31.F32 11899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 11999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX0 Q0.F32 12099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY0 Q8.F32 12199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY1 Q9.F32 12299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY2 Q10.F32 12399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY3 Q11.F32 12499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qZ0 Q7.F32 12599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qZ1 Q13.F32 12699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qZ2 Q14.F32 12799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qZ3 Q15.F32 12899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 12999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 13099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 13199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .MACRO FFTSTAGE scaled, inverse , name 13299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 13399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// Define stack arguments 13499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 13599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 13699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// pOut0+1 increments pOut0 by 8 bytes 13799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// pOut0+outPointStep == increment of 8*outPointStep bytes 13899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV outPointStep,subFFTSize,LSL #3 13999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 14099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// Update grpCount and grpSize rightaway 14199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 14299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD2 {dW1r,dW1i},[pTwiddle :128] @// [wi|wr] 14399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV step16,#16 14499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com LSL grpCount,subFFTSize,#2 14599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 14699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW2r,[pTwiddle :64] @// [wi|wr] 14799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV subFFTNum,#1 @//after the last stage 14899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 14999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW3r,[pTwiddle :64],step16 @// [wi|wr] 15099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV stepTwiddle,#0 15199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 15299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW2i,[pTwiddle :64]! @// [wi|wr] 15399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB grpTwStep,stepTwiddle,#8 @// grpTwStep = -8 to start with 15499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 15599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// update subFFTSize for the next stage 15699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV subFFTSize,grpCount 15799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW3i,[pTwiddle :64],grpTwStep @// [wi|wr] 15899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV dstStep,outPointStep,LSL #1 15999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 16099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// AC.r AC.i BD.r BD.i 16199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD4 {dButterfly1Real02,dButterfly1Imag02,dButterfly1Real13,dButterfly1Imag13},[pSrc :256]! 16299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com ADD dstStep,dstStep,outPointStep @// dstStep = 3*outPointStep 16399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com RSB dstStep,dstStep,#16 @// dstStep = - 3*outPointStep+16 16499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV step24,#24 16599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 16699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// AC.r AC.i BD.r BD.i 16799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD4 {dButterfly2Real02,dButterfly2Imag02,dButterfly2Real13,dButterfly2Imag13},[pSrc :256]! 16899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 16999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 17099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// Process two groups at a time 17199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 17299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.comradix4lsGrpLoop\name : 17399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 17499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VZIP dW2r,dW2i 17599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com ADD stepTwiddle,stepTwiddle,#16 17699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VZIP dW3r,dW3i 17799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com ADD grpTwStep,stepTwiddle,#4 17899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VUZP dButterfly1Real13, dButterfly2Real13 @// B.r D.r 17999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB twStep,stepTwiddle,#16 @// -16+stepTwiddle 18099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VUZP dButterfly1Imag13, dButterfly2Imag13 @// B.i D.i 18199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV grpTwStep,grpTwStep,LSL #1 18299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VUZP dButterfly1Real02, dButterfly2Real02 @// A.r C.r 18399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com RSB grpTwStep,grpTwStep,#0 @// -8-2*stepTwiddle 18499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 18599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 18699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VUZP dButterfly1Imag02, dButterfly2Imag02 @// A.i C.i 18799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 18899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 18999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// grpCount is multiplied by 4 19099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUBS grpCount,grpCount,#8 19199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 19299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .ifeqs "\inverse", "TRUE" 19399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZr1,dW1r,dXr1 19499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLA dZr1,dW1i,dXi1 @// real part 19599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZi1,dW1r,dXi1 19699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLS dZi1,dW1i,dXr1 @// imag part 19799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 19899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .else 19999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 20099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZr1,dW1r,dXr1 20199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLS dZr1,dW1i,dXi1 @// real part 20299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZi1,dW1r,dXi1 20399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLA dZi1,dW1i,dXr1 @// imag part 20499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 20599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .endif 20699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 20799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD2 {dW1r,dW1i},[pTwiddle :128],stepTwiddle @// [wi|wr] 20899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 20999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .ifeqs "\inverse", "TRUE" 21099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZr2,dW2r,dXr2 21199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLA dZr2,dW2i,dXi2 @// real part 21299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZi2,dW2r,dXi2 21399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW2r,[pTwiddle :64],step16 @// [wi|wr] 21499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLS dZi2,dW2i,dXr2 @// imag part 21599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 21699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .else 21799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 21899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZr2,dW2r,dXr2 21999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLS dZr2,dW2i,dXi2 @// real part 22099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZi2,dW2r,dXi2 22199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW2r,[pTwiddle :64],step16 @// [wi|wr] 22299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLA dZi2,dW2i,dXr2 @// imag part 22399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 22499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .endif 22599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 22699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 22799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW2i,[pTwiddle :64],twStep @// [wi|wr] 22899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 22999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// move qX0 so as to load for the next iteration 23099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMOV qZ0,qX0 23199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 23299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .ifeqs "\inverse", "TRUE" 23399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZr3,dW3r,dXr3 23499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLA dZr3,dW3i,dXi3 @// real part 23599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZi3,dW3r,dXi3 23699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW3r,[pTwiddle :64],step24 23799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLS dZi3,dW3i,dXr3 @// imag part 23899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 23999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .else 24099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 24199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZr3,dW3r,dXr3 24299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLS dZr3,dW3i,dXi3 @// real part 24399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMUL dZi3,dW3r,dXi3 24499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW3r,[pTwiddle :64],step24 24599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VMLA dZi3,dW3i,dXr3 @// imag part 24699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 24799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .endif 24899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 24999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VLD1 dW3i,[pTwiddle :64],grpTwStep @// [wi|wr] 25099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 2516ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com @// Don't do the load on the last iteration so we don't read past the end 2526ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com @// of pSrc. 2536ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com addeq pSrc, pSrc, #64 2546ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com beq radix4lsSkipRead\name 25599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// AC.r AC.i BD.r BD.i 2566ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com VLD4 {dButterfly1Real02,dButterfly1Imag02,dButterfly1Real13,dButterfly1Imag13},[pSrc :256]! 25799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 2586ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com @// AC.r AC.i BD.r BD.i 2596ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com VLD4 {dButterfly2Real02,dButterfly2Imag02,dButterfly2Real13,dButterfly2Imag13},[pSrc :256]! 2606ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.comradix4lsSkipRead\name: 26199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 26299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// finish first stage of 4 point FFT 26399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 26499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD qY0,qZ0,qZ2 26599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB qY2,qZ0,qZ2 26699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD qY1,qZ1,qZ3 26799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB qY3,qZ1,qZ3 26899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 26999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 27099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// finish second stage of 4 point FFT 27199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 27299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .ifeqs "\inverse", "TRUE" 27399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 27499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB qZ0,qY2,qY1 27599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 27699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD dZr3,dYr0,dYi3 27799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr0,dZi0},[pDst :128],outPointStep 27899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB dZi3,dYi0,dYr3 27999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 28099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD qZ2,qY2,qY1 28199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr3,dZi3},[pDst :128],outPointStep 28299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 28399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB dZr1,dYr0,dYi3 28499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr2,dZi2},[pDst :128],outPointStep 28599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD dZi1,dYi0,dYr3 28699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 28799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// dstStep = -outPointStep + 16 28899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr1,dZi1},[pDst :128],dstStep 28999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 29099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 29199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .else 29299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 29399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB qZ0,qY2,qY1 29499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 29599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB dZr1,dYr0,dYi3 29699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr0,dZi0},[pDst :128],outPointStep 29799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD dZi1,dYi0,dYr3 29899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 29999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD qZ2,qY2,qY1 30099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr1,dZi1},[pDst :128],outPointStep 30199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 30299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VADD dZr3,dYr0,dYi3 30399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr2,dZi2},[pDst :128],outPointStep 30499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VSUB dZi3,dYi0,dYr3 30599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 30699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// dstStep = -outPointStep + 16 30799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com VST2 {dZr3,dZi3},[pDst :128],dstStep 30899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 30999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 31099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .endif 31199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 31299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com BGT radix4lsGrpLoop\name 31399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 31499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 31599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// Reset and Swap pSrc and pDst for the next stage 31699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com MOV pTmp,pDst 31799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// Extra increment done in final iteration of the loop 31899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB pSrc,pSrc,#64 31999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// pDst -= 4*size; pSrc -= 8*size bytes 32099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB pDst,pSrc,outPointStep,LSL #2 32199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB pSrc,pTmp,outPointStep 32299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB pTwiddle,pTwiddle,subFFTSize,LSL #1 32399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com @// Extra increment done in final iteration of the loop 32499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com SUB pTwiddle,pTwiddle,#16 32599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 32699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .endm 32799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 32899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 32999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com M_START armSP_FFTFwd_CToC_FC32_Radix4_ls_OutOfPlace_unsafe,r4 33099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com FFTSTAGE "FALSE","FALSE",fwd 33199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com M_END 33299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 33399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 33499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com M_START armSP_FFTInv_CToC_FC32_Radix4_ls_OutOfPlace_unsafe,r4 33599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com FFTSTAGE "FALSE","TRUE",inv 33699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com M_END 33799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 33899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com 33999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com .end 340