]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/mlpdsp.c
tiffdec: remove an unneeded variable
[ffmpeg] / libavcodec / x86 / mlpdsp.c
index a18e9fa67bdd05bb6eaa57ccb508d209794797ca..72fc637764dcb6275d5ba33bb91888d1012222f9 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/attributes.h"
 #include "libavutil/internal.h"
+#include "libavutil/cpu.h"
 #include "libavutil/x86/asm.h"
+#include "libavutil/x86/cpu.h"
 #include "libavcodec/mlpdsp.h"
 #include "libavcodec/mlp.h"
 
@@ -174,9 +177,11 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff,
 
 #endif /* HAVE_7REGS && HAVE_INLINE_ASM */
 
-void ff_mlpdsp_init_x86(MLPDSPContext *c)
+av_cold void ff_mlpdsp_init_x86(MLPDSPContext *c)
 {
 #if HAVE_7REGS && HAVE_INLINE_ASM
-    c->mlp_filter_channel = mlp_filter_channel_x86;
+    int cpu_flags = av_get_cpu_flags();
+    if (INLINE_MMX(cpu_flags))
+        c->mlp_filter_channel = mlp_filter_channel_x86;
 #endif
 }