* 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 "libavcodec/dsputil.h"
+#include "libavutil/x86/cpu.h"
+#include "libavcodec/mlpdsp.h"
#include "libavcodec/mlp.h"
-#if HAVE_7REGS
+#if HAVE_7REGS && HAVE_INLINE_ASM
extern char ff_mlp_firorder_8;
extern char ff_mlp_firorder_7;
);
}
-#endif /* HAVE_7REGS */
+#endif /* HAVE_7REGS && HAVE_INLINE_ASM */
-void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_mlpdsp_init_x86(MLPDSPContext *c)
{
-#if HAVE_7REGS
- c->mlp_filter_channel = mlp_filter_channel_x86;
+#if HAVE_7REGS && HAVE_INLINE_ASM
+ int cpu_flags = av_get_cpu_flags();
+ if (INLINE_MMX(cpu_flags))
+ c->mlp_filter_channel = mlp_filter_channel_x86;
#endif
}