| OLD | NEW |
| 1 /* Copyright (c) 2009-2010 Xiph.Org Foundation | 1 /* Copyright (c) 2014, Cisco Systems, INC |
| 2 Written by Jean-Marc Valin */ | 2 Written by XiangMingZhu WeiZhou MinPeng YanWang |
| 3 /* | 3 |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| 11 - Redistributions in binary form must reproduce the above copyright | 11 - Redistributions in binary form must reproduce the above copyright |
| 12 notice, this list of conditions and the following disclaimer in the | 12 notice, this list of conditions and the following disclaimer in the |
| 13 documentation and/or other materials provided with the distribution. | 13 documentation and/or other materials provided with the distribution. |
| 14 | 14 |
| 15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 16 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 16 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 17 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 17 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 18 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | 18 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER |
| 19 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 19 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 20 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | 22 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 23 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 23 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 24 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 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. | 25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef PLC_H | 28 #ifndef CELT_LPC_SSE_H |
| 29 #define PLC_H | 29 #define CELT_LPC_SSE_H |
| 30 | 30 |
| 31 #include "arch.h" | 31 #ifdef HAVE_CONFIG_H |
| 32 #include "config.h" |
| 33 #endif |
| 32 | 34 |
| 33 #define LPC_ORDER 24 | 35 #if defined(OPUS_X86_MAY_HAVE_SSE4_1) |
| 34 | 36 void celt_fir_sse4_1( |
| 35 void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); | 37 const opus_val16 *x, |
| 36 | |
| 37 void celt_fir(const opus_val16 *x, | |
| 38 const opus_val16 *num, | 38 const opus_val16 *num, |
| 39 opus_val16 *y, | 39 opus_val16 *y, |
| 40 int N, | 40 int N, |
| 41 int ord, | 41 int ord, |
| 42 opus_val16 *mem); | 42 opus_val16 *mem, |
| 43 int arch); |
| 43 | 44 |
| 44 void celt_iir(const opus_val32 *x, | 45 extern void (*const CELT_FIR_IMPL[OPUS_ARCHMASK + 1])( |
| 45 const opus_val16 *den, | 46 const opus_val16 *x, |
| 46 opus_val32 *y, | 47 const opus_val16 *num, |
| 48 opus_val16 *y, |
| 47 int N, | 49 int N, |
| 48 int ord, | 50 int ord, |
| 49 opus_val16 *mem); | 51 opus_val16 *mem, |
| 52 int arch); |
| 50 | 53 |
| 51 int _celt_autocorr(const opus_val16 *x, opus_val32 *ac, | 54 # define celt_fir(x, num, y, N, ord, mem, arch) \ |
| 52 const opus_val16 *window, int overlap, int lag, int n, int arch); | 55 ((*CELT_FIR_IMPL[(arch) & OPUS_ARCHMASK])(x, num, y, N, ord, mem, arch)) |
| 53 | 56 |
| 54 #endif /* PLC_H */ | 57 #endif |
| 58 #endif |
| OLD | NEW |