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 /***********************************************************************
18 * File: lag_wind.c *
19 * *
20 * Description: Lag_windows on autocorrelations *
21 * r[i] *= lag_wind[i] *
22 * *
23 ************************************************************************/
24
25 #include "typedef.h"
26 #include "basic_op.h"
27 #include "oper_32b.h"
28 #include "lag_wind.tab"
29
30
Lag_window(Word16 r_h[],Word16 r_l[])31 void Lag_window(
32 Word16 r_h[], /* (i/o) : Autocorrelations (msb) */
33 Word16 r_l[] /* (i/o) : Autocorrelations (lsb) */
34 )
35 {
36 Word32 i;
37 Word32 x;
38
39 for (i = 1; i <= M; i++)
40 {
41 x = Mpy_32(r_h[i], r_l[i], volag_h[i - 1], volag_l[i - 1]);
42 r_h[i] = x >> 16;
43 r_l[i] = (x & 0xffff)>>1;
44 }
45 return;
46 }
47
48
49
50