diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6c9673f13d74d2e31d3719c8318904d0c2ffd46f..a891651f2676cf6869af002d8e1068a91fcea670 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -694,7 +694,7 @@ HOSTPROGS = aac_tablegen aacps_tablegen cbrt_tablegen cos_tablegen      \
             dv_tablegen motionpixels_tablegen mpegaudio_tablegen        \
             pcm_tablegen qdm2_tablegen sinewin_tablegen
 
-DIRS = alpha arm avr32 bfin ppc ps2 sh4 sparc x86
+DIRS = alpha arm avr32 bfin mips ppc sh4 sparc x86
 
 CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 26e9c42f9dc8b940265ea5b1f486fe4865b80c3e..6afa140ebddf6b7f7819e49b863b908accd071e2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1729,7 +1729,7 @@ typedef struct AVCodecContext {
 #define FF_IDCT_SIMPLE        2
 #define FF_IDCT_SIMPLEMMX     3
 #define FF_IDCT_LIBMPEG2MMX   4
-#define FF_IDCT_PS2           5
+#define FF_IDCT_MMI           5
 #define FF_IDCT_ARM           7
 #define FF_IDCT_ALTIVEC       8
 #define FF_IDCT_SH4           9
diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 3f4da68ec9be91333bdeb3444a97bf3d66034002..006617687e49f828b98f5811320542135663c7cb 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -1,3 +1,3 @@
-OBJS-$(HAVE_MMI)                       += ps2/dsputil_mmi.o             \
-                                          ps2/idct_mmi.o                \
-                                          ps2/mpegvideo_mmi.o           \
+OBJS-$(HAVE_MMI) += mips/dsputil_mmi.o                                  \
+                    mips/idct_mmi.o                                     \
+                    mips/mpegvideo_mmi.o                                \
diff --git a/libavcodec/ps2/dsputil_mmi.c b/libavcodec/mips/dsputil_mmi.c
similarity index 98%
rename from libavcodec/ps2/dsputil_mmi.c
rename to libavcodec/mips/dsputil_mmi.c
index 06e3bdabcbad3cfc83b89ddebd2b4c7d7ed9f2f7..20a435a0657a5b4bb4a377de9d205a2e391a535e 100644
--- a/libavcodec/ps2/dsputil_mmi.c
+++ b/libavcodec/mips/dsputil_mmi.c
@@ -153,7 +153,7 @@ void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
     }
 
     if (avctx->bits_per_raw_sample <= 8 &&
-        (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_PS2)) {
+        (idct_algo == FF_IDCT_AUTO || idct_algo == FF_IDCT_MMI)) {
         c->idct_put= ff_mmi_idct_put;
         c->idct_add= ff_mmi_idct_add;
         c->idct    = ff_mmi_idct;
diff --git a/libavcodec/ps2/idct_mmi.c b/libavcodec/mips/idct_mmi.c
similarity index 100%
rename from libavcodec/ps2/idct_mmi.c
rename to libavcodec/mips/idct_mmi.c
diff --git a/libavcodec/ps2/mmi.h b/libavcodec/mips/mmi.h
similarity index 98%
rename from libavcodec/ps2/mmi.h
rename to libavcodec/mips/mmi.h
index cbd0921946af1e1cd7a66a59c171cb9f44fd98b1..48f27788091a49453118cb26a7f799d03d3b3ead 100644
--- a/libavcodec/ps2/mmi.h
+++ b/libavcodec/mips/mmi.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_PS2_MMI_H
-#define AVCODEC_PS2_MMI_H
+#ifndef AVCODEC_MIPS_MMI_H
+#define AVCODEC_MIPS_MMI_H
 
 #include <stdint.h>
 
@@ -176,4 +176,4 @@ void ff_mmi_idct(DCTELEM *block);
 #define         pextlb(rs, rt, rd) \
         __asm__ volatile ("pextlb  " #rd ", " #rs ", " #rt )
 
-#endif /* AVCODEC_PS2_MMI_H */
+#endif /* AVCODEC_MIPS_MMI_H */
diff --git a/libavcodec/ps2/mpegvideo_mmi.c b/libavcodec/mips/mpegvideo_mmi.c
similarity index 100%
rename from libavcodec/ps2/mpegvideo_mmi.c
rename to libavcodec/mips/mpegvideo_mmi.c
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 04fb1b404be30a7399ad1bc5f3cacd6c6e3e4b41..81e910cb7e7cce4508f144b16e7946e65fcdff7b 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -214,7 +214,7 @@ static const AVOption options[]={
 {"simple", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"libmpeg2mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
-{"ps2", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_PS2 }, INT_MIN, INT_MAX, V|E|D, "idct"},
+{"mmi", NULL, 0, AV_OPT_TYPE_CONST, { .dbl = FF_IDCT_MMI }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"arm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"sh4", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SH4 }, INT_MIN, INT_MAX, V|E|D, "idct"},