From: Stefano Sabatini <stefasab@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Stefano Sabatini <stefasab@gmail.com>
Subject: [FFmpeg-devel] [PATCH 2/3] lavc: clarify meaning of avctx.level option
Date: Sat, 26 Aug 2023 03:10:29 +0200
Message-ID: <20230826011030.76116-2-stefasab@gmail.com> (raw)
In-Reply-To: <20230826011030.76116-1-stefasab@gmail.com>
---
doc/codecs.texi | 5 ++++-
libavcodec/avcodec.h | 4 +++-
libavcodec/options_table.h | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/doc/codecs.texi b/doc/codecs.texi
index f903dad754..0aa848f62f 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 649411ac79..50d2086c13 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1722,7 +1722,9 @@ typedef struct AVCodecContext {
/**
* level
- * - encoding: Set by user.
+ * - encoding: Set by user, corresponds to a specific level defined by the
+ * codec, usually corresponding to the profile level, if not specified it
+ * set to FF_LEVEL_UNKNOWN
* - decoding: Set by libavcodec.
*/
int level;
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index bb4b894b06..5f0d674dbe 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 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.profile"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.profile"},
{"main10", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_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"},
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-08-26 1:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 1:10 [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-08-26 1:10 ` Stefano Sabatini [this message]
2023-08-26 1:10 ` [FFmpeg-devel] [PATCH 3/3] doc/encoders/libx264: clarify meaning of level option Stefano Sabatini
2023-09-06 5:37 ` Gyan Doshi
2023-10-06 7:54 ` Stefano Sabatini
2023-09-05 23:11 ` [FFmpeg-devel] [PATCH 1/3] doc/encoders/libx264: review and extend option description Stefano Sabatini
2023-09-06 5:34 ` Gyan Doshi
2023-11-04 21:26 ` Stefano Sabatini
2023-11-19 11:34 ` Stefano Sabatini
2023-12-03 12:06 ` Stefano Sabatini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230826011030.76116-2-stefasab@gmail.com \
--to=stefasab@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git