- if (!high_bit_depth) {
- if (avctx->idct_algo == FF_IDCT_AUTO ||
- avctx->idct_algo == FF_IDCT_XVID) {
- c->idct_put = ff_xvid_idct_put_mmi;
- c->idct_add = ff_xvid_idct_add_mmi;
- c->idct = ff_xvid_idct_mmi;
- c->perm_type = FF_IDCT_PERM_NONE;
+ int cpu_flags = av_get_cpu_flags();
+
+ if (have_mmi(cpu_flags)) {
+ if (!high_bit_depth) {
+ if (avctx->idct_algo == FF_IDCT_AUTO ||
+ avctx->idct_algo == FF_IDCT_XVID) {
+ c->idct_put = ff_xvid_idct_put_mmi;
+ c->idct_add = ff_xvid_idct_add_mmi;
+ c->idct = ff_xvid_idct_mmi;
+ c->perm_type = FF_IDCT_PERM_NONE;
+ }