blob: 323459eb1a83156664784742ddca78e1c44e6dc0 [file] [log] [blame]
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -04001/* Copyright (c) 2009-2010 Xiph.Org Foundation
2 Written by Jean-Marc Valin */
3/*
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions
6 are met:
7
8 - Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10
11 - Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
14
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040015 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Jean-Marc Valincb05e7c2012-04-20 16:40:24 -040018 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
19 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040020 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef PLC_H
29#define PLC_H
30
31#include "arch.h"
xiangmingzhuc95c9a02014-04-30 15:48:07 +080032#include "cpu_support.h"
33
34#if defined(OPUS_X86_MAY_HAVE_SSE4_1)
35#include "x86/celt_lpc_sse.h"
36#endif
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040037
38#define LPC_ORDER 24
39
Jean-Marc Valinff5f7222011-07-29 18:59:12 -040040void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p);
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040041
xiangmingzhuc95c9a02014-04-30 15:48:07 +080042void celt_fir_c(
43 const opus_val16 *x,
Jean-Marc Valinff5f7222011-07-29 18:59:12 -040044 const opus_val16 *num,
45 opus_val16 *y,
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040046 int N,
47 int ord,
xiangmingzhuc95c9a02014-04-30 15:48:07 +080048 opus_val16 *mem,
49 int arch);
50
Jonathan Lennox43120f02015-08-03 17:04:27 -040051#if !defined(OVERRIDE_CELT_FIR)
xiangmingzhuc95c9a02014-04-30 15:48:07 +080052#define celt_fir(x, num, y, N, ord, mem, arch) \
53 (celt_fir_c(x, num, y, N, ord, mem, arch))
54#endif
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040055
Jean-Marc Valin7fc2fbd2011-09-01 13:40:39 -040056void celt_iir(const opus_val32 *x,
Jean-Marc Valinff5f7222011-07-29 18:59:12 -040057 const opus_val16 *den,
58 opus_val32 *y,
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040059 int N,
60 int ord,
xiangmingzhuc95c9a02014-04-30 15:48:07 +080061 opus_val16 *mem,
62 int arch);
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040063
Timothy B. Terriberry39386e02013-11-18 13:30:13 -050064int _celt_autocorr(const opus_val16 *x, opus_val32 *ac,
65 const opus_val16 *window, int overlap, int lag, int n, int arch);
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040066
Jean-Marc Valin6c3788c2010-06-20 22:48:50 -040067#endif /* PLC_H */