|
|
@ -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 }, |
|
|
|
{ "vertical_offset", NULL, OFFSET(vertical_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, |
|
|
|
{ NULL }, |
|
|
|
{ NULL }, |
|
|
|
}; |
|
|
|
}; |
|
|
|
#undef FLAGS |
|
|
|
|
|
|
|
#undef OFFSET |
|
|
|
#undef OFFSET |
|
|
|
|
|
|
|
|
|
|
|
static const AVClass tile_grid_class = { |
|
|
|
static const AVClass tile_grid_class = { |
|
|
@ -357,6 +356,20 @@ static const AVClass tile_grid_class = { |
|
|
|
.option = tile_grid_options, |
|
|
|
.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) |
|
|
|
static void *stream_group_child_next(void *obj, void *prev) |
|
|
|
{ |
|
|
|
{ |
|
|
|
AVStreamGroup *stg = obj; |
|
|
|
AVStreamGroup *stg = obj; |
|
|
@ -368,6 +381,8 @@ static void *stream_group_child_next(void *obj, void *prev) |
|
|
|
return stg->params.iamf_mix_presentation; |
|
|
|
return stg->params.iamf_mix_presentation; |
|
|
|
case AV_STREAM_GROUP_PARAMS_TILE_GRID: |
|
|
|
case AV_STREAM_GROUP_PARAMS_TILE_GRID: |
|
|
|
return stg->params.tile_grid; |
|
|
|
return stg->params.tile_grid; |
|
|
|
|
|
|
|
case AV_STREAM_GROUP_PARAMS_LCEVC: |
|
|
|
|
|
|
|
return stg->params.lcevc; |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
@ -375,6 +390,8 @@ static void *stream_group_child_next(void *obj, void *prev) |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef FLAGS |
|
|
|
|
|
|
|
|
|
|
|
static const AVClass *stream_group_child_iterate(void **opaque) |
|
|
|
static const AVClass *stream_group_child_iterate(void **opaque) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uintptr_t i = (uintptr_t)*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: |
|
|
|
case AV_STREAM_GROUP_PARAMS_TILE_GRID: |
|
|
|
ret = &tile_grid_class; |
|
|
|
ret = &tile_grid_class; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case AV_STREAM_GROUP_PARAMS_LCEVC: |
|
|
|
|
|
|
|
ret = &lcevc_class; |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
@ -462,6 +482,13 @@ AVStreamGroup *avformat_stream_group_create(AVFormatContext *s, |
|
|
|
stg->params.tile_grid->av_class = &tile_grid_class; |
|
|
|
stg->params.tile_grid->av_class = &tile_grid_class; |
|
|
|
av_opt_set_defaults(stg->params.tile_grid); |
|
|
|
av_opt_set_defaults(stg->params.tile_grid); |
|
|
|
break; |
|
|
|
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: |
|
|
|
default: |
|
|
|
goto fail; |
|
|
|
goto fail; |
|
|
|
} |
|
|
|
} |
|
|
|