|
|
|
@ -348,7 +348,6 @@ static const AVOption tile_grid_options[] = { |
|
|
|
|
{ "vertical_offset", NULL, OFFSET(vertical_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, |
|
|
|
|
{ NULL }, |
|
|
|
|
}; |
|
|
|
|
#undef FLAGS |
|
|
|
|
#undef OFFSET |
|
|
|
|
|
|
|
|
|
static const AVClass tile_grid_class = { |
|
|
|
@ -357,6 +356,20 @@ static const AVClass tile_grid_class = { |
|
|
|
|
.option = tile_grid_options, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#define OFFSET(x) offsetof(AVStreamGroupLCEVC, x) |
|
|
|
|
static const AVOption lcevc_options[] = { |
|
|
|
|
{ "video_size", "size of video after LCEVC enhancement has been applied", OFFSET(width), |
|
|
|
|
AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, INT_MAX, FLAGS }, |
|
|
|
|
{ NULL }, |
|
|
|
|
}; |
|
|
|
|
#undef OFFSET |
|
|
|
|
|
|
|
|
|
static const AVClass lcevc_class = { |
|
|
|
|
.class_name = "AVStreamGroupLCEVC", |
|
|
|
|
.version = LIBAVUTIL_VERSION_INT, |
|
|
|
|
.option = lcevc_options, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static void *stream_group_child_next(void *obj, void *prev) |
|
|
|
|
{ |
|
|
|
|
AVStreamGroup *stg = obj; |
|
|
|
@ -368,6 +381,8 @@ static void *stream_group_child_next(void *obj, void *prev) |
|
|
|
|
return stg->params.iamf_mix_presentation; |
|
|
|
|
case AV_STREAM_GROUP_PARAMS_TILE_GRID: |
|
|
|
|
return stg->params.tile_grid; |
|
|
|
|
case AV_STREAM_GROUP_PARAMS_LCEVC: |
|
|
|
|
return stg->params.lcevc; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -375,6 +390,8 @@ static void *stream_group_child_next(void *obj, void *prev) |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#undef FLAGS |
|
|
|
|
|
|
|
|
|
static const AVClass *stream_group_child_iterate(void **opaque) |
|
|
|
|
{ |
|
|
|
|
uintptr_t i = (uintptr_t)*opaque; |
|
|
|
@ -393,6 +410,9 @@ static const AVClass *stream_group_child_iterate(void **opaque) |
|
|
|
|
case AV_STREAM_GROUP_PARAMS_TILE_GRID: |
|
|
|
|
ret = &tile_grid_class; |
|
|
|
|
break; |
|
|
|
|
case AV_STREAM_GROUP_PARAMS_LCEVC: |
|
|
|
|
ret = &lcevc_class; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -462,6 +482,13 @@ AVStreamGroup *avformat_stream_group_create(AVFormatContext *s, |
|
|
|
|
stg->params.tile_grid->av_class = &tile_grid_class; |
|
|
|
|
av_opt_set_defaults(stg->params.tile_grid); |
|
|
|
|
break; |
|
|
|
|
case AV_STREAM_GROUP_PARAMS_LCEVC: |
|
|
|
|
stg->params.lcevc = av_mallocz(sizeof(*stg->params.lcevc)); |
|
|
|
|
if (!stg->params.lcevc) |
|
|
|
|
goto fail; |
|
|
|
|
stg->params.lcevc->av_class = &lcevc_class; |
|
|
|
|
av_opt_set_defaults(stg->params.lcevc); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
goto fail; |
|
|
|
|
} |
|
|
|
|