diff mbox series

[FFmpeg-devel] avcodec/options_table: make AVCodecContext->level search for child constants

Message ID 20200729220858.29264-1-jamrial@gmail.com
State Accepted
Commit 8a3f561c341fb2c2b7667c38a6801e2633257577
Headers show
Series [FFmpeg-devel] avcodec/options_table: make AVCodecContext->level search for child constants | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

James Almer July 29, 2020, 10:08 p.m. UTC
This change makes it possible for child encoders to define custom level
option names which can be used for setting the AVCodecContext->level.

Based on 337fe4bcc2

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/options_table.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

James Almer July 29, 2020, 10:36 p.m. UTC | #1
On 7/29/2020 7:08 PM, James Almer wrote:
> This change makes it possible for child encoders to define custom level
> option names which can be used for setting the AVCodecContext->level.
> 
> Based on 337fe4bcc2
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/options_table.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed by jkqxz on IRC, and pushed.
diff mbox series

Patch

diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 8ba137f51e..1d0db1b5a4 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -264,8 +264,8 @@  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, "level"},
-{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"},
+{"level", NULL, 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},
 #if FF_API_PRIVATE_OPT
 {"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},