1 /* Copyright (c) 2014, Cisco Systems, INC 2 Written by XiangMingZhu WeiZhou MinPeng YanWang 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 15 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 18 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 19 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 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 CELT_LPC_SSE_H 29 #define CELT_LPC_SSE_H 30 31 #ifdef HAVE_CONFIG_H 32 #include "config.h" 33 #endif 34 35 #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) 36 #define OVERRIDE_CELT_FIR 37 38 void celt_fir_sse4_1( 39 const opus_val16 *x, 40 const opus_val16 *num, 41 opus_val16 *y, 42 int N, 43 int ord, 44 opus_val16 *mem, 45 int arch); 46 47 #if defined(OPUS_X86_PRESUME_SSE4_1) 48 #define celt_fir(x, num, y, N, ord, mem, arch) \ 49 ((void)arch, celt_fir_sse4_1(x, num, y, N, ord, mem, arch)) 50 51 #else 52 53 extern void (*const CELT_FIR_IMPL[OPUS_ARCHMASK + 1])( 54 const opus_val16 *x, 55 const opus_val16 *num, 56 opus_val16 *y, 57 int N, 58 int ord, 59 opus_val16 *mem, 60 int arch); 61 62 # define celt_fir(x, num, y, N, ord, mem, arch) \ 63 ((*CELT_FIR_IMPL[(arch) & OPUS_ARCHMASK])(x, num, y, N, ord, mem, arch)) 64 65 #endif 66 #endif 67 68 #endif 69