2 @ ** Copyright 2003-2010, VisualOn, Inc.
\r
4 @ ** Licensed under the Apache License, Version 2.0 (the "License");
\r
5 @ ** you may not use this file except in compliance with the License.
\r
6 @ ** You may obtain a copy of the License at
\r
8 @ ** http://www.apache.org/licenses/LICENSE-2.0
\r
10 @ ** Unless required by applicable law or agreed to in writing, software
\r
11 @ ** distributed under the License is distributed on an "AS IS" BASIS,
\r
12 @ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 @ ** See the License for the specific language governing permissions and
\r
14 @ ** limitations under the License.
\r
17 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\r
18 @ File: CalcWindowEnergy_v5.s
\r
20 @ Content: CalcWindowEnergy function armv5 assemble
\r
22 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\r
26 .global CalcWindowEnergy
\r
29 stmdb sp!, {r4 - r11, lr}
\r
32 mov r3, r3, lsl #16
\r
33 ldr r10, [r0, #168] @ states0 = blockSwitchingControl->iirStates[0];
\r
34 mov r3, r3, asr #16
\r
35 ldr r11, [r0, #172] @ states1 = blockSwitchingControl->iirStates[1];
\r
38 ldr r12, hiPassCoeff @ Coeff0 = hiPassCoeff[0];
\r
40 ldr r14, hiPassCoeff + 4 @ Coeff1 = hiPassCoeff[1];
\r
43 mov r5, #0 @ wOffset = 0;
\r
46 mov r6, #0 @ accuUE = 0;
\r
47 mov r7, #0 @ accuFE = 0;
\r
56 ldrsh r9, [r1, r9] @ tempUnfiltered = timeSignal[tidx];
\r
58 add r5, r5, r2 @ tidx = tidx + chIncrement;
\r
60 smulwb r3, r14, r9 @ accu1 = L_mpy_ls(Coeff1, tempUnfiltered);
\r
61 smull r0, r8, r12, r11 @ accu2 = fixmul( Coeff0, states1 );
\r
66 sub r0, r3, r10 @ accu3 = accu1 - states0;
\r
67 sub r8, r0, r8 @ out = accu3 - accu2;
\r
69 mov r10, r3 @ states0 = accu1;
\r
70 mov r11, r8 @ states1 = out;
\r
76 add r6, r6, r3, asr #7
\r
81 add r7, r7, r9, asr #7
\r
90 add r4, r0, r8, lsl #2
\r
100 str r10, [r0, #168]
\r
101 str r11, [r0, #172]
\r
105 ldmia sp!, {r4 - r11, pc}
\r