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
20 * Description: Compute the LPC residual by filtering *
\r
21 * the input speech through A(z) *
\r
23 ************************************************************************/
\r
25 #include "typedef.h"
\r
26 #include "basic_op.h"
\r
29 Word16 a[], /* (i) Q12 : prediction coefficients */
\r
30 Word16 x[], /* (i) : speech (values x[-m..-1] are needed */
\r
31 Word16 y[], /* (o) x2 : residual signal */
\r
32 Word16 lg /* (i) : size of filtering */
\r
37 for (i = 0; i < lg; i++)
\r
41 s = vo_mult32((*p1++), (*p2--));
\r
42 s += vo_mult32((*p1++), (*p2--));
\r
43 s += vo_mult32((*p1++), (*p2--));
\r
44 s += vo_mult32((*p1++), (*p2--));
\r
45 s += vo_mult32((*p1++), (*p2--));
\r
46 s += vo_mult32((*p1++), (*p2--));
\r
47 s += vo_mult32((*p1++), (*p2--));
\r
48 s += vo_mult32((*p1++), (*p2--));
\r
49 s += vo_mult32((*p1++), (*p2--));
\r
50 s += vo_mult32((*p1++), (*p2--));
\r
51 s += vo_mult32((*p1++), (*p2--));
\r
52 s += vo_mult32((*p1++), (*p2--));
\r
53 s += vo_mult32((*p1++), (*p2--));
\r
54 s += vo_mult32((*p1++), (*p2--));
\r
55 s += vo_mult32((*p1++), (*p2--));
\r
56 s += vo_mult32((*p1++), (*p2--));
\r
57 s += vo_mult32((*p1), (*p2));
\r
60 y[i] = extract_h(L_add(s, 0x8000));
\r