Commit f1fa1eed authored by Vittorio Giovara's avatar Vittorio Giovara

mpegvideo: Expand macro

Having this macro in an header only facilitates the use of such header.
The code increase is minimal and files have one less dependency
on mpegvideo.h.
parent e7af52a6
......@@ -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",
......
......@@ -324,7 +324,12 @@ av_cold void ff_h261_encode_init(MpegEncContext *s)
s->c_dc_scale_table = ff_mpeg1_dc_scale_table;
}
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",
......
......@@ -574,14 +574,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
......
......@@ -4374,7 +4374,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",
......@@ -4389,7 +4394,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",
......@@ -4404,7 +4414,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",
......
......@@ -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",
......
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment