diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2024-05-30 16:09:32 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2024-06-18 14:47:40 +0100 |
commit | 57bfba35d6ba45d6f0dbc46f129fe1893cd04252 (patch) | |
tree | 6ef5548ea308d657d3f0da32f2fd93211479ec59 | |
parent | b515088576bbeb746aa34a222bba76cc01b29e44 (diff) | |
download | ffmpeg-57bfba35d6ba45d6f0dbc46f129fe1893cd04252.tar.gz |
avutil/spherical: Add more spherical types
These originate from the Apple Vision Pro, and are documented here:
https://developer.apple.com/documentation/coremedia/cmprojectiontype
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r-- | doc/APIchanges | 5 | ||||
-rw-r--r-- | libavutil/spherical.c | 5 | ||||
-rw-r--r-- | libavutil/spherical.h | 16 | ||||
-rw-r--r-- | libavutil/version.h | 2 |
4 files changed, 27 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 193e39ad4f..fcb20872a6 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,11 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-06-18 - xxxxxxxxxx - lavu 59.23.100 - spherical.h + Add AV_SPHERICAL_HALF_EQUIRECTANGULAR, AV_SPHERICAL_RECTILINEAR, and + AV_SPHERICAL_FISHEYE values to AVSphericalProjection, and initialize + to AV_SPHERICAL_RECTILINEAR on alloc. + 2024-06-13 - xxxxxxxxxx - lavu 59.22.100 - common.h Deprecate av_mod_uintp2[_c]() and replace it with av_zero_extend[_c](). diff --git a/libavutil/spherical.c b/libavutil/spherical.c index 800d3459a5..64ade1d0ec 100644 --- a/libavutil/spherical.c +++ b/libavutil/spherical.c @@ -29,6 +29,8 @@ AVSphericalMapping *av_spherical_alloc(size_t *size) if (!spherical) return NULL; + spherical->projection = AV_SPHERICAL_RECTILINEAR; + if (size) *size = sizeof(*spherical); @@ -57,6 +59,9 @@ static const char *const spherical_projection_names[] = { [AV_SPHERICAL_EQUIRECTANGULAR] = "equirectangular", [AV_SPHERICAL_CUBEMAP] = "cubemap", [AV_SPHERICAL_EQUIRECTANGULAR_TILE] = "tiled equirectangular", + [AV_SPHERICAL_HALF_EQUIRECTANGULAR] = "half equirectangular", + [AV_SPHERICAL_RECTILINEAR] = "rectilinear", + [AV_SPHERICAL_FISHEYE] = "fisheye", }; const char *av_spherical_projection_name(enum AVSphericalProjection projection) diff --git a/libavutil/spherical.h b/libavutil/spherical.h index 828ac836da..2e90f7752d 100644 --- a/libavutil/spherical.h +++ b/libavutil/spherical.h @@ -66,6 +66,22 @@ enum AVSphericalProjection { * the position of the current video in a larger surface. */ AV_SPHERICAL_EQUIRECTANGULAR_TILE, + + /** + * Video frame displays as a 180 degree equirectangular projection. + */ + AV_SPHERICAL_HALF_EQUIRECTANGULAR, + + /** + * Video frame displays on a flat, rectangular 2D surface. + */ + AV_SPHERICAL_RECTILINEAR, + + /** + * Fisheye projection (Apple). + * See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/fisheye + */ + AV_SPHERICAL_FISHEYE, }; /** diff --git a/libavutil/version.h b/libavutil/version.h index 2756f2aa03..7df546ee22 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 22 +#define LIBAVUTIL_VERSION_MINOR 23 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |