Skip to content

Commit

Permalink
avcodec/mpeg12enc: support mpeg2 encoder const level
Browse files Browse the repository at this point in the history
Signed-off-by: Limin Wang <[email protected]>
  • Loading branch information
lance-lmwang committed Aug 14, 2020
1 parent 9f702fc commit ad49dd7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/encoders.texi
Original file line number Diff line number Diff line change
Expand Up @@ -2902,6 +2902,16 @@ SNR Scalable
@item simple
@end table

@item level
Select the mpeg2 level to encode:

@table @samp
@item high
@item high1440
@item main
@item low
@end table

@item seq_disp_ext @var{integer}
Specifies if the encoder should write a sequence_display_extension to the
output.
Expand Down
6 changes: 6 additions & 0 deletions libavcodec/mpeg12enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit ad49dd7

Please sign in to comment.