1@/* 2@ ** Copyright 2003-2010, VisualOn, Inc. 3@ ** 4@ ** Licensed under the Apache License, Version 2.0 (the "License"); 5@ ** you may not use this file except in compliance with the License. 6@ ** You may obtain a copy of the License at 7@ ** 8@ ** http://www.apache.org/licenses/LICENSE-2.0 9@ ** 10@ ** Unless required by applicable law or agreed to in writing, software 11@ ** distributed under the License is distributed on an "AS IS" BASIS, 12@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13@ ** See the License for the specific language governing permissions and 14@ ** limitations under the License. 15@ */ 16@ 17@void Pred_lt4( 18@ Word16 exc[], /* in/out: excitation buffer */ 19@ Word16 T0, /* input : integer pitch lag */ 20@ Word16 frac, /* input : fraction of lag */ 21@ Word16 L_subfr /* input : subframe size */ 22@) 23@*********************************************************************** 24@ r0 --- exc[] 25@ r1 --- T0 26@ r2 --- frac 27@ r3 --- L_subfr 28 29 .section .text 30 .global pred_lt4_asm 31 .extern inter4_2 32 .hidden inter4_2 33 34pred_lt4_asm: 35 36 STMFD r13!, {r4 - r12, r14} 37 SUB r4, r0, r1, LSL #1 @ x = exc - T0 38 RSB r2, r2, #0 @ frac = - frac 39 SUB r4, r4, #30 @ x -= L_INTERPOL2 - 1 40 CMP r2, #0 41 ADDLT r2, r2, #4 @ frac += UP_SAMP 42 SUBLT r4, r4, #2 @ x-- 43 44 ADR r8, Lable1 45 LDR r11, [r8] 46 ADD r11, r8 47 RSB r2, r2, #3 @ k = UP_SAMP - 1 - frac 48 MOV r8, #0 @ j = 0 49 ADD r11, r11, r2, LSL #6 @ get inter4_2[k][] 50 51 VLD1.S16 {Q0, Q1}, [r11]! 52 VLD1.S16 {Q2, Q3}, [r11]! 53 54 MOV r6, #0x8000 55 56 VLD1.S16 {Q4, Q5}, [r4]! @load 16 x[] 57 VLD1.S16 {Q6, Q7}, [r4]! @load 16 x[] 58 59LOOP: 60 VQDMULL.S16 Q15, D8, D0 61 VQDMLAL.S16 Q15, D9, D1 62 VQDMLAL.S16 Q15, D10, D2 63 VQDMLAL.S16 Q15, D11, D3 64 65 VQDMLAL.S16 Q15, D12, D4 66 VQDMLAL.S16 Q15, D13, D5 67 VQDMLAL.S16 Q15, D14, D6 68 VQDMLAL.S16 Q15, D15, D7 69 70 LDRSH r12, [r4], #2 71 72 VEXT.S16 D8, D8, D9, #1 73 VEXT.S16 D9, D9, D10, #1 74 VEXT.S16 D10, D10, D11, #1 75 VEXT.S16 D11, D11, D12, #1 76 VDUP.S16 D24, r12 77 VEXT.S16 D12, D12, D13, #1 78 VEXT.S16 D13, D13, D14, #1 79 80 VQADD.S32 D30, D30, D31 81 MOV r11, #0x8000 82 VPADD.S32 D30, D30, D30 83 ADD r8, r8, #1 84 VMOV.S32 r12, D30[0] 85 VEXT.S16 D14, D14, D15, #1 86 87 QADD r1, r12, r12 @ L_sum = (L_sum << 2) 88 VEXT.S16 D15, D15, D24, #1 89 QADD r5, r1, r6 90 MOV r1, r5, ASR #16 91 CMP r8, r3 92 STRH r1, [r0], #2 @ exc[j] = (L_sum + 0x8000) >> 16 93 BLT LOOP 94 95pred_lt4_end: 96 97 LDMFD r13!, {r4 - r12, r15} 98 99Lable1: 100 .word inter4_2-Lable1 101 @ENDFUNC 102 .end 103 104