diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2023-08-26 02:34:06 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2023-10-06 09:49:47 +0200 |
commit | 6f421d9d4eb8425ce2ecb1f7f18b79ede3c60de9 (patch) | |
tree | 7303dd42e93d9fc27b083fcda5934b0b22091d2a | |
parent | f7ac3512f5b5cb8eb149f37300b43461d8e93af3 (diff) | |
download | ffmpeg-6f421d9d4eb8425ce2ecb1f7f18b79ede3c60de9.tar.gz |
lavc: clarify meaning of avctx.level option
-rw-r--r-- | doc/codecs.texi | 5 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 6 | ||||
-rw-r--r-- | libavcodec/options_table.h | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/doc/codecs.texi b/doc/codecs.texi index a155939606..5b950b4560 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -697,10 +697,13 @@ profiles are documented in the relevant encoder documentation. @item level @var{integer} (@emph{encoding,audio,video}) +Set the encoder level. This level depends on the specific codec, and +might correspond to the profile level. It is set by default to +@samp{unknown}. + Possible values: @table @samp @item unknown - @end table @item lowres @var{integer} (@emph{decoding,audio,video}) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 09400b97b0..3916f66980 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1730,8 +1730,10 @@ typedef struct AVCodecContext { #endif /** - * level - * - encoding: Set by user. + * Encoding level descriptor. + * - encoding: Set by user, corresponds to a specific level defined by the + * codec, usually corresponding to the profile level, if not specified it + * is set to FF_LEVEL_UNKNOWN. * - decoding: Set by libavcodec. * See AV_LEVEL_* in defs.h. */ diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index f2155232cf..ee243d9894 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -226,7 +226,7 @@ static const AVOption avcodec_options[] = { {"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.i64 = AV_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.profile"}, {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.profile"}, {"main10", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, V|E, "avctx.profile"}, -{"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.level"}, +{"level", "encoding level, usually corresponding to the profile level, codec-specific", OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.level"}, {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.level"}, {"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D}, {"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, |