From d8a5a67489256296bd2ca014be673dca8d615c89 Mon Sep 17 00:00:00 2001
From: Michael Bradshaw <mjbshaw@google.com>
Date: Fri, 5 Feb 2016 12:22:35 -0800
Subject: [PATCH] libavcodec: fix building without asm

clang needs HAVE_MMX to be first in order to avoid an undefined
reference error.
---
 libavcodec/dirac_dwt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/dirac_dwt.c b/libavcodec/dirac_dwt.c
index 6cf32ae..4c3ed94 100644
--- a/libavcodec/dirac_dwt.c
+++ b/libavcodec/dirac_dwt.c
@@ -54,8 +54,9 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
         return AVERROR_INVALIDDATA;
     }
 
-    if (bit_depth == 8 && HAVE_MMX)
+    if (HAVE_MMX && bit_depth == 8)
         ff_spatial_idwt_init_mmx(d, type);
+
     return 0;
 }
 
-- 
2.7.0

