1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

avformat: add an split Color and Alpha channel Stream Group

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2026-10-19 11:19:57 -03:00
parent 368aee9d25
commit e5605b4bb4
5 changed files with 12 additions and 3 deletions

View File

@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2026-06-23.
API changes, most recent first:
2026-10-23 - xxxxxxxxxxx - lavf 63.14.100 - avformat.h
Add AV_STREAM_GROUP_PARAMS_ALPHA.
2026-10-21 - b8249f73a7c - lavu 61.16.100 - hwcontext.h
Add av_hwframe_get_transfer_buffer().

View File

@@ -123,6 +123,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
case AV_STREAM_GROUP_PARAMS_LCEVC:
case AV_STREAM_GROUP_PARAMS_DOLBY_VISION:
case AV_STREAM_GROUP_PARAMS_GAIN_MAP:
case AV_STREAM_GROUP_PARAMS_ALPHA:
av_opt_free(stg->params.layered_video);
av_freep(&stg->params.layered_video);
break;
@@ -290,6 +291,7 @@ const char *avformat_stream_group_name(enum AVStreamGroupParamsType type)
case AV_STREAM_GROUP_PARAMS_TREF: return "Track Reference";
case AV_STREAM_GROUP_PARAMS_DOLBY_VISION: return "Dolby Vision (Split base and enhancement layer)";
case AV_STREAM_GROUP_PARAMS_GAIN_MAP: return "Gain Map (Split base rendition and gain map)";
case AV_STREAM_GROUP_PARAMS_ALPHA: return "Alpha (Split color and alpha channels)";
}
return NULL;
}

View File

@@ -1098,8 +1098,8 @@ typedef struct AVStreamGroupTileGrid {
* layer video stream and a separate enhancement layer stream that together
* form a single layered video presentation (for example a video stream and a
* data stream containing LCEVC enhancement layer NALUs, Dolby Vision
* Profile 7 dual-layer encoding, or a base rendition accompanied by an
* ISO 21496-1 gain map).
* Profile 7 dual-layer encoding, an Alpha plane being a separate stream, or
* a base rendition accompanied by an ISO 21496-1 gain map).
*
* The enhancement layer stream is identified by @ref el_index.
*/
@@ -1165,6 +1165,7 @@ enum AVStreamGroupParamsType {
AV_STREAM_GROUP_PARAMS_TREF,
AV_STREAM_GROUP_PARAMS_DOLBY_VISION,
AV_STREAM_GROUP_PARAMS_GAIN_MAP,
AV_STREAM_GROUP_PARAMS_ALPHA,
};
struct AVIAMFAudioElement;

View File

@@ -404,6 +404,7 @@ static void *stream_group_child_next(void *obj, void *prev)
case AV_STREAM_GROUP_PARAMS_LCEVC:
case AV_STREAM_GROUP_PARAMS_DOLBY_VISION:
case AV_STREAM_GROUP_PARAMS_GAIN_MAP:
case AV_STREAM_GROUP_PARAMS_ALPHA:
return stg->params.layered_video;
default:
break;
@@ -438,6 +439,7 @@ static const AVClass *stream_group_child_iterate(void **opaque)
case AV_STREAM_GROUP_PARAMS_LCEVC:
case AV_STREAM_GROUP_PARAMS_DOLBY_VISION:
case AV_STREAM_GROUP_PARAMS_GAIN_MAP:
case AV_STREAM_GROUP_PARAMS_ALPHA:
ret = &layered_video_class;
break;
default:
@@ -518,6 +520,7 @@ AVStreamGroup *avformat_stream_group_create(AVFormatContext *s,
case AV_STREAM_GROUP_PARAMS_LCEVC:
case AV_STREAM_GROUP_PARAMS_DOLBY_VISION:
case AV_STREAM_GROUP_PARAMS_GAIN_MAP:
case AV_STREAM_GROUP_PARAMS_ALPHA:
stg->params.layered_video = av_mallocz(sizeof(*stg->params.layered_video));
if (!stg->params.layered_video)
goto fail;

View File

@@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 13
#define LIBAVFORMAT_VERSION_MINOR 14
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \