diff --git a/avconv.c b/avconv.c
index be47da097740ac58e3671f818a302f96ef9d268e..8d8c802f56f1f1c244c8f8b7422a2e80b01fbfb8 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1745,9 +1745,6 @@ static int transcode_init(void)
                 av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low."
                                              "It takes bits/s as argument, not kbits/s\n");
             extra_size += ost->st->codec->extradata_size;
-
-            if (ost->st->codec->me_threshold)
-                input_streams[ost->source_index]->st->codec->debug |= FF_DEBUG_MV;
         } else {
             av_opt_set_dict(ost->st->codec, &ost->opts);
         }
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ac086aa4f8cf57653bf3df54e3ca01e32766da0e..87d04348eb98d684e77e200fa5ab620a2c4a7b4c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2306,7 +2306,12 @@ typedef struct AVCodecContext {
 #define FF_DEBUG_BITSTREAM   4
 #define FF_DEBUG_MB_TYPE     8
 #define FF_DEBUG_QP          16
+#if FF_API_DEBUG_MV
+/**
+ * @deprecated this option does nothing
+ */
 #define FF_DEBUG_MV          32
+#endif
 #define FF_DEBUG_DCT_COEFF   0x00000040
 #define FF_DEBUG_SKIP        0x00000080
 #define FF_DEBUG_STARTCODE   0x00000100
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 718f946302ad02106b7105f26369aa2aa4ea1f7b..ae458ab96d37dd1a1c75d2c776789a3a3fb8ccd8 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -321,8 +321,7 @@ static int alloc_picture_tables(MpegEncContext *s, Picture *pic)
             return AVERROR(ENOMEM);
     }
 
-    if (s->out_format == FMT_H263 || s->encoding ||
-               (s->avctx->debug & FF_DEBUG_MV) || s->avctx->debug_mv) {
+    if (s->out_format == FMT_H263 || s->encoding) {
         int mv_size        = 2 * (b8_array_size + 4) * sizeof(int16_t);
         int ref_index_size = 4 * mb_array_size;
 
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index f6be31b49237a76439a6020c17f8cbd217157bba..6c2f0904d36bd4798d8d32bd335b29c13b5c300b 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -209,7 +209,9 @@ static const AVOption avcodec_options[] = {
 {"bitstream", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BITSTREAM }, INT_MIN, INT_MAX, V|D, "debug"},
 {"mb_type", "macroblock (MB) type", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"},
 {"qp", "per-block quantization parameter (QP)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_QP }, INT_MIN, INT_MAX, V|D, "debug"},
+#if FF_API_DEBUG_MV
 {"mv", "motion vector", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MV }, INT_MIN, INT_MAX, V|D, "debug"},
+#endif
 {"dct_coeff", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_DCT_COEFF }, INT_MIN, INT_MAX, V|D, "debug"},
 {"skip", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_SKIP }, INT_MIN, INT_MAX, V|D, "debug"},
 {"startcode", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_STARTCODE }, INT_MIN, INT_MAX, V|D, "debug"},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index aec0ccd3cf1c950476081c376f24502c18967f3a..aaa61cc02b94e0e781b25d93a607fc6aee65fa12 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -76,5 +76,8 @@
 #ifndef FF_API_SET_DIMENSIONS
 #define FF_API_SET_DIMENSIONS    (LIBAVCODEC_VERSION_MAJOR < 56)
 #endif
+#ifndef FF_API_DEBUG_MV
+#define FF_API_DEBUG_MV          (LIBAVCODEC_VERSION_MAJOR < 56)
+#endif
 
 #endif /* AVCODEC_VERSION_H */