/* * SIMD-optimized LPC functions * Copyright (c) 2007 Loren Merritt * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/attributes.h" #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" #include "libavcodec/lpc.h" void ff_lpc_apply_welch_window_sse2(const int32_t *data, ptrdiff_t len, double *w_data); void ff_lpc_apply_welch_window_avx2(const int32_t *data, ptrdiff_t len, double *w_data); DECLARE_ASM_CONST(16, double, pd_1)[2] = { 1.0, 1.0 }; #if HAVE_SSE2_INLINE static void lpc_compute_autocorr_sse2(const double *data, ptrdiff_t len, int lag, double *autoc) { int j; if((x86_reg)data & 15) data++; for(j=0; jlpc_compute_autocorr = lpc_compute_autocorr_sse2; #endif if (EXTERNAL_SSE2(cpu_flags)) c->lpc_apply_welch_window = ff_lpc_apply_welch_window_sse2; if (EXTERNAL_AVX2(cpu_flags)) c->lpc_apply_welch_window = ff_lpc_apply_welch_window_avx2; }