]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/lpc_mmx.c
x86: fft: elf64: fix PIC build
[ffmpeg] / libavcodec / x86 / lpc_mmx.c
index 3a0a1f0f6fd6f49cadf47c644207fd8c88d27f4e..27bebe856a6d7d9a6adb38aa56c4b3235e251dc5 100644 (file)
@@ -2,20 +2,20 @@
  * MMX optimized LPC DSP utils
  * Copyright (c) 2007 Loren Merritt
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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,
+ * Libav 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
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "libavutil/cpu.h"
 #include "libavcodec/lpc.h"
 
-static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data)
+#if HAVE_INLINE_ASM
+
+static void lpc_apply_welch_window_sse2(const int32_t *data, int len,
+                                        double *w_data)
 {
     double c = 2.0 / (len-1.0);
     int n2 = len>>1;
@@ -70,7 +73,7 @@ static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data
 }
 
 static void lpc_compute_autocorr_sse2(const double *data, int len, int lag,
-                                   double *autoc)
+                                      double *autoc)
 {
     int j;
 
@@ -135,12 +138,16 @@ static void lpc_compute_autocorr_sse2(const double *data, int len, int lag,
     }
 }
 
+#endif /* HAVE_INLINE_ASM */
+
 av_cold void ff_lpc_init_x86(LPCContext *c)
 {
     int mm_flags = av_get_cpu_flags();
 
+#if HAVE_INLINE_ASM
     if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) {
-        c->lpc_apply_welch_window = apply_welch_window_sse2;
-        c->lpc_compute_autocorr = lpc_compute_autocorr_sse2;
+        c->lpc_apply_welch_window = lpc_apply_welch_window_sse2;
+        c->lpc_compute_autocorr   = lpc_compute_autocorr_sse2;
     }
+#endif /* HAVE_INLINE_ASM */
 }