Browse Source

lavu/spherical: Add support for Spherical Immersive type

Vittorio Giovara 4 months ago
parent
commit
119d127d05
5 changed files with 14 additions and 1 deletions
  1. 3 0
      doc/APIchanges
  2. 3 0
      libavformat/mov.c
  3. 1 0
      libavutil/spherical.c
  4. 6 0
      libavutil/spherical.h
  5. 1 1
      libavutil/version.h

+ 3 - 0
doc/APIchanges

@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
 
 API changes, most recent first:
 
+2025-07-31 - xxxxxxxxxx - lavu 60.7.100 - spherical.h
+  Add AV_SPHERICAL_PARAMETRIC_IMMERSIVE.
+
 2025-07-20 - xxxxxxxxxx - lavu 60.6.100 - attributes.h, avstring.h
   Add av_scanf_format() and use it on av_sscanf().
 

+ 3 - 0
libavformat/mov.c

@@ -6858,6 +6858,9 @@ static int mov_read_vexu_proj(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     case MKTAG('f','i','s','h'):
         projection = AV_SPHERICAL_FISHEYE;
         break;
+    case MKTAG('p','r','i','m'):
+        projection = AV_SPHERICAL_PARAMETRIC_IMMERSIVE;
+        break;
     default:
         av_log(c->fc, AV_LOG_ERROR, "Invalid projection type in prji box: 0x%08X\n", tag);
         return AVERROR_INVALIDDATA;

+ 1 - 0
libavutil/spherical.c

@@ -62,6 +62,7 @@ static const char *const spherical_projection_names[] = {
     [AV_SPHERICAL_HALF_EQUIRECTANGULAR] = "half equirectangular",
     [AV_SPHERICAL_RECTILINEAR]          = "rectilinear",
     [AV_SPHERICAL_FISHEYE]              = "fisheye",
+    [AV_SPHERICAL_PARAMETRIC_IMMERSIVE] = "parametric immersive",
 };
 
 const char *av_spherical_projection_name(enum AVSphericalProjection projection)

+ 6 - 0
libavutil/spherical.h

@@ -82,6 +82,12 @@ enum AVSphericalProjection {
      * See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/fisheye
      */
     AV_SPHERICAL_FISHEYE,
+
+    /**
+     * Parametric Immersive projection (Apple).
+     * See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/parametricimmersive
+     */
+    AV_SPHERICAL_PARAMETRIC_IMMERSIVE,
 };
 
 /**

+ 1 - 1
libavutil/version.h

@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  60
-#define LIBAVUTIL_VERSION_MINOR   6
+#define LIBAVUTIL_VERSION_MINOR   7
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \