diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c
index c1ff45056d0834ff815cdb5a86349ea80f644c45..a2cd39955e65b612e8a1e7283ae5ddb03766edbc 100644
--- a/libavcodec/flvenc.c
+++ b/libavcodec/flvenc.c
@@ -91,7 +91,12 @@ void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level,
     }
 }
 
-FF_MPV_GENERIC_CLASS(flv)
+static const AVClass flv_class = {
+    .class_name = "flv encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_flv_encoder = {
     .name           = "flv",
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 8ef272dbf06e7645ec39b421cfcecf4aceda925d..f8eb1b07021cb291f1df846aa1c6e449a0edc491 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -378,7 +378,12 @@ av_cold void ff_h261_encode_init(MpegEncContext *s)
     s->intra_ac_vlc_last_length = s->inter_ac_vlc_last_length = uni_h261_rl_len + 128*64;
 }
 
-FF_MPV_GENERIC_CLASS(h261)
+static const AVClass h261_class = {
+    .class_name = "h261 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_h261_encoder = {
     .name           = "h261",
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 2188725e26a5811cd0636b9ae2bfcbcc38a54e03..c3ede0728d725e040b3b759db7ec4a6ca99ac82f 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -252,7 +252,13 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
 }
 
 #if CONFIG_MJPEG_ENCODER
-FF_MPV_GENERIC_CLASS(mjpeg)
+
+static const AVClass mjpeg_class = {
+    .class_name = "mjpeg encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_mjpeg_encoder = {
     .name           = "mjpeg",
@@ -271,7 +277,12 @@ AVCodec ff_mjpeg_encoder = {
 };
 #endif
 #if CONFIG_AMV_ENCODER
-FF_MPV_GENERIC_CLASS(amv)
+static const AVClass amv_class = {
+    .class_name = "amv encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_amv_encoder = {
     .name           = "amv",
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 7a33824c71bafde2101be64745d766b5893e0639..13be43d047243b7067697d7bafe31420fd8f3f6a 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -596,14 +596,6 @@ typedef struct MpegEncContext {
 
 extern const AVOption ff_mpv_generic_options[];
 
-#define FF_MPV_GENERIC_CLASS(name) \
-static const AVClass name ## _class = {\
-    .class_name = #name " encoder",\
-    .item_name  = av_default_item_name,\
-    .option     = ff_mpv_generic_options,\
-    .version    = LIBAVUTIL_VERSION_INT,\
-};
-
 /**
  * Set the given MpegEncContext to common defaults (same for encoding
  * and decoding).  The changed fields will not depend upon the prior
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 2b6740fdbdbe817e66134deb8bc420524830061d..e729d36aa26f2031261ce991859789073b840291 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -4667,7 +4667,12 @@ AVCodec ff_h263p_encoder = {
     .priv_class     = &h263p_class,
 };
 
-FF_MPV_GENERIC_CLASS(msmpeg4v2)
+static const AVClass msmpeg4v2_class = {
+    .class_name = "msmpeg4v2 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_msmpeg4v2_encoder = {
     .name           = "msmpeg4v2",
@@ -4682,7 +4687,12 @@ AVCodec ff_msmpeg4v2_encoder = {
     .priv_class     = &msmpeg4v2_class,
 };
 
-FF_MPV_GENERIC_CLASS(msmpeg4v3)
+static const AVClass msmpeg4v3_class = {
+    .class_name = "msmpeg4v3 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_msmpeg4v3_encoder = {
     .name           = "msmpeg4",
@@ -4697,7 +4707,12 @@ AVCodec ff_msmpeg4v3_encoder = {
     .priv_class     = &msmpeg4v3_class,
 };
 
-FF_MPV_GENERIC_CLASS(wmv1)
+static const AVClass wmv1_class = {
+    .class_name = "wmv1 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_wmv1_encoder = {
     .name           = "wmv1",
diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c
index 61fa15ed5df86cbbcdfbda9faa0aa1107bc0cb0a..b17acbc9b5cd683608a61ab57e92f785aa58d196 100644
--- a/libavcodec/rv10enc.c
+++ b/libavcodec/rv10enc.c
@@ -63,7 +63,12 @@ int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number)
     return 0;
 }
 
-FF_MPV_GENERIC_CLASS(rv10)
+static const AVClass rv10_class = {
+    .class_name = "rv10 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_rv10_encoder = {
     .name           = "rv10",
diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c
index a42d413a0c6877d6f703bc0492906304b8a95787..81fb4fc1bad7635f2ae97425e1e4e37304e3a101 100644
--- a/libavcodec/rv20enc.c
+++ b/libavcodec/rv20enc.c
@@ -60,7 +60,12 @@ void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number){
     }
 }
 
-FF_MPV_GENERIC_CLASS(rv20)
+static const AVClass rv20_class = {
+    .class_name = "rv20 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_rv20_encoder = {
     .name           = "rv20",
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index 55ee089ed080889dbd1f259a89b0385596a7d218..0499f0a1edde577cc4cfbff2f6654369f496b673 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -213,7 +213,12 @@ void ff_wmv2_encode_mb(MpegEncContext *s, int16_t block[6][64],
         s->p_tex_bits += get_bits_diff(s);
 }
 
-FF_MPV_GENERIC_CLASS(wmv2)
+static const AVClass wmv2_class = {
+    .class_name = "wmv2 encoder",
+    .item_name  = av_default_item_name,
+    .option     = ff_mpv_generic_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 AVCodec ff_wmv2_encoder = {
     .name           = "wmv2",