]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpeg12enc.c
avcodec/mpeg12enc: support mpeg2 encoder const level
[ffmpeg] / libavcodec / mpeg12enc.c
index 9fbbcef60783e819262056dc0c8a7f785a9e5e47..f246427eeb320c02838708da3a24292f707a8c4b 100644 (file)
@@ -1167,6 +1167,12 @@ static const AVOption mpeg2_options[] = {
     {     "secam",        NULL, 0, AV_OPT_TYPE_CONST,  {.i64 = VIDEO_FORMAT_SECAM      },  0, 0, VE, "video_format" },
     {     "mac",          NULL, 0, AV_OPT_TYPE_CONST,  {.i64 = VIDEO_FORMAT_MAC        },  0, 0, VE, "video_format" },
     {     "unspecified",  NULL, 0, AV_OPT_TYPE_CONST,  {.i64 = VIDEO_FORMAT_UNSPECIFIED},  0, 0, VE, "video_format" },
+#define LEVEL(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, { .i64 = value }, 0, 0, VE, "avctx.level"
+    { LEVEL("high",     4) },
+    { LEVEL("high1440", 6) },
+    { LEVEL("main",     8) },
+    { LEVEL("low",     10) },
+#undef LEVEL
     FF_MPV_COMMON_OPTS
     FF_MPEG2_PROFILE_OPTS
     { NULL },