History

avutil/spherical: Add more spherical types

These originate from the Apple Vision Pro, and are documented here: https://developer.apple.com/documentation/coremedia/cmprojectiontype

Derek Buitenhuis committed 2 years ago

Commit 57bfba31 parent b5150884 files · +27 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +5 −0
  2. libavutil/spherical.c +5 −0
  3. libavutil/spherical.h +16 −0
  4. libavutil/version.h +1 −1
doc/APIchanges+5−0
@@ -2,6 +2,11 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
22
33 API changes, most recent first:
44
5+2024-06-18 - xxxxxxxxxx - lavu 59.23.100 - spherical.h
6+ Add AV_SPHERICAL_HALF_EQUIRECTANGULAR, AV_SPHERICAL_RECTILINEAR, and
7+ AV_SPHERICAL_FISHEYE values to AVSphericalProjection, and initialize
8+ to AV_SPHERICAL_RECTILINEAR on alloc.
9+
510 2024-06-13 - xxxxxxxxxx - lavu 59.22.100 - common.h
611 Deprecate av_mod_uintp2[_c]() and replace it with av_zero_extend[_c]().
712
libavutil/spherical.c+5−0
@@ -29,6 +29,8 @@ AVSphericalMapping *av_spherical_alloc(size_t *size) · 28 unmodified lines
2929 if (!spherical)
3030 return NULL;
3131
32+ spherical->projection = AV_SPHERICAL_RECTILINEAR;
33+
3234 if (size)
3335 *size = sizeof(*spherical);
3436
@@ -57,6 +59,9 @@ static const char *const spherical_projection_names[] = { · 22 unmodified lines
5759 [AV_SPHERICAL_EQUIRECTANGULAR] = "equirectangular",
5860 [AV_SPHERICAL_CUBEMAP] = "cubemap",
5961 [AV_SPHERICAL_EQUIRECTANGULAR_TILE] = "tiled equirectangular",
62+ [AV_SPHERICAL_HALF_EQUIRECTANGULAR] = "half equirectangular",
63+ [AV_SPHERICAL_RECTILINEAR] = "rectilinear",
64+ [AV_SPHERICAL_FISHEYE] = "fisheye",
6065 };
6166
6267 const char *av_spherical_projection_name(enum AVSphericalProjection projection)
libavutil/spherical.h+16−0
@@ -66,6 +66,22 @@ enum AVSphericalProjection { · 65 unmodified lines
6666 * the position of the current video in a larger surface.
6767 */
6868 AV_SPHERICAL_EQUIRECTANGULAR_TILE,
69+
70+ /**
71+ * Video frame displays as a 180 degree equirectangular projection.
72+ */
73+ AV_SPHERICAL_HALF_EQUIRECTANGULAR,
74+
75+ /**
76+ * Video frame displays on a flat, rectangular 2D surface.
77+ */
78+ AV_SPHERICAL_RECTILINEAR,
79+
80+ /**
81+ * Fisheye projection (Apple).
82+ * See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/fisheye
83+ */
84+ AV_SPHERICAL_FISHEYE,
6985 };
7086
7187 /**
libavutil/version.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
7979 */
8080
8181 #define LIBAVUTIL_VERSION_MAJOR 59
82−#define LIBAVUTIL_VERSION_MINOR 22
82+#define LIBAVUTIL_VERSION_MINOR 23
8383 #define LIBAVUTIL_VERSION_MICRO 100
8484
8585 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t