lavu/frame: add side data storing view ID for multi-view video

This commit is contained in:
Anton Khirnov 2017-08-06 20:13:47 +02:00
parent a7505ec562
commit 6940a6de2f
6 changed files with 18 additions and 1 deletions

View File

@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
2024-09-23 - xxxxxxx - lavu 59.38.100 - frame.h
Add AV_FRAME_DATA_VIEW_ID.
2024-09-23 - xxxxxxxxxx - lavc 61.18.100 - avcodec.h
Add a new flag AV_CODEC_EXPORT_DATA_ENHANCEMENTS for export_side_data.

View File

@ -2920,6 +2920,8 @@ static void print_frame_side_data(WriterContext *w,
} else if (sd->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS) {
AVFilmGrainParams *fgp = (AVFilmGrainParams *)sd->data;
print_film_grain_params(w, fgp);
} else if (sd->type == AV_FRAME_DATA_VIEW_ID) {
print_int("view_id", *(int*)sd->data);
}
writer_print_section_footer(w);
}

View File

@ -857,6 +857,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
case AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT:
dump_ambient_viewing_environment(ctx, sd);
break;
case AV_FRAME_DATA_VIEW_ID:
av_log(ctx, AV_LOG_INFO, "view id: %d\n", *(int*)sd->data);
default:
if (name)
av_log(ctx, AV_LOG_INFO,

View File

@ -47,6 +47,7 @@ static const AVSideDataDescriptor sd_props[] = {
[AV_FRAME_DATA_DOVI_RPU_BUFFER] = { "Dolby Vision RPU Data" },
[AV_FRAME_DATA_DOVI_METADATA] = { "Dolby Vision Metadata" },
[AV_FRAME_DATA_LCEVC] = { "LCEVC NAL data" },
[AV_FRAME_DATA_VIEW_ID] = { "View ID" },
[AV_FRAME_DATA_STEREO3D] = { "Stereo 3D", AV_SIDE_DATA_PROP_GLOBAL },
[AV_FRAME_DATA_REPLAYGAIN] = { "AVReplayGain", AV_SIDE_DATA_PROP_GLOBAL },
[AV_FRAME_DATA_DISPLAYMATRIX] = { "3x3 displaymatrix", AV_SIDE_DATA_PROP_GLOBAL },

View File

@ -234,6 +234,15 @@ enum AVFrameSideDataType {
* bytes intact.
*/
AV_FRAME_DATA_LCEVC,
/**
* This side data must be associated with a video frame.
* The presence of this side data indicates that the video stream is
* composed of multiple views (e.g. stereoscopic 3D content,
* cf. H.264 Annex H or H.265 Annex G).
* The data is an int storing the view ID.
*/
AV_FRAME_DATA_VIEW_ID,
};
enum AVActiveFormatDescription {

View File

@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 59
#define LIBAVUTIL_VERSION_MINOR 37
#define LIBAVUTIL_VERSION_MINOR 38
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \