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