1@/****************************************************************************** 2@ * 3@ * Copyright (C) 2018 The Android Open Source Project 4@ * 5@ * Licensed under the Apache License, Version 2.0 (the "License"); 6@ * you may not use this file except in compliance with the License. 7@ * You may obtain a copy of the License at: 8@ * 9@ * http://www.apache.org/licenses/LICENSE-2.0 10@ * 11@ * Unless required by applicable law or agreed to in writing, software 12@ * distributed under the License is distributed on an "AS IS" BASIS, 13@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14@ * See the License for the specific language governing permissions and 15@ * limitations under the License. 16@ * 17@ ***************************************************************************** 18@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19@*/ 20 21 22.text 23.p2align 2 24 .extern ixheaacd_esbr_cos_sin_mod 25.hidden ixheaacd_esbr_cos_sin_mod 26 .global ixheaacd_esbr_fwd_modulation 27 .type ixheaacd_esbr_fwd_modulation, %function 28ixheaacd_esbr_fwd_modulation: 29 30 STMFD sp!, {r4-r12, lr} 31 VPUSH {D8 - D15} 32 LDR R4, [R3] 33 ADD R5, R0, R4, LSL #3 34 MOV R6, R1 35 MOV R7, R2 36 37LOOP1: 38 SUB R5, R5, #32 39 VLD1.32 {D0, D1, D2, D3}, [R0]! 40 VLD1.32 {D4, D5, D6, D7}, [R5] 41 VSHR.S32 Q0, Q0, #4 42 VSHR.S32 Q1, Q1, #4 43 VSHR.S32 Q2, Q2, #4 44 VSHR.S32 Q3, Q3, #4 45 46 vswp d4, d7 47 vswp d5, d6 48 49 vrev64.32 q2, q2 50 vrev64.32 q3, q3 51 52 VQSUB.S32 Q4, Q0, Q2 53 VQSUB.S32 Q5, Q1, Q3 54 55 VADD.S32 Q6, Q0, Q2 56 VADD.S32 Q7, Q1, Q3 57 58 SUBS R4, R4, #8 59 VST1.32 {D8, D9, D10, D11}, [R6]! 60 VST1.32 {D12, D13, D14, D15}, [R7]! 61 62 BGT LOOP1 63 STMFD sp!, {r0-r3, lr} 64 LDR R4, [SP, #124] 65 MOV R0, R1 66 MOV R1, R3 67 MOVW R5, #0x41FC 68 ADD R2, R4, R5 69 ADD R3, R4, #0xB8 70 71 BL ixheaacd_esbr_cos_sin_mod 72 73 LDMFD sp!, {r0-r3, r14} 74 75 LDR R0, [R3, #0x5C] 76 LDRSH R4, [R3, #0x2C] 77 LDRSH R5, [R3, #0x2A] 78 79 SUB R4, R4, R5 80 81LOOP2: 82 VLD2.32 {D0, D1}, [R0]! 83 VLD1.32 {D2}, [R1] 84 VLD1.32 {D3}, [R2] 85 86 VMULL.S32 q2, d0, d2 87 VMULL.S32 q3, d0, d3 88 VMULL.S32 q4, d1, d2 89 VMULL.S32 q5, d1, d3 90 91 VADD.I64 Q0, Q2, Q5 92 VQSUB.S64 Q1, Q3, Q4 93 94 VSHRN.I64 D0, Q0, #31 95 VSHRN.I64 D2, Q1, #31 96 97 SUBS R4, R4, #2 98 VST1.32 {D0}, [R1]! 99 VST1.32 {D2}, [R2]! 100 101 BGT LOOP2 102 103 VPOP {D8-D15} 104 LDMFD sp!, {r4-r12, r15} 105 106 107 108 109 110 111 112 113