This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit a6e5fa3fbb5562f14a666964b77cb7560e1a92cd
Author:     James Almer <[email protected]>
AuthorDate: Sat Dec 27 17:05:51 2025 -0300
Commit:     James Almer <[email protected]>
CommitDate: Mon Dec 29 11:59:36 2025 -0300

    avutil/iamf: add an AVOption for AVIAMFLayer.demixing_matrix
    
    Plus a length field, to fulfill the requirements of AV_OPT_TYPE_FLAG_ARRAY 
options.
    
    Signed-off-by: James Almer <[email protected]>
---
 doc/APIchanges      |  3 +++
 libavutil/iamf.c    |  4 ++++
 libavutil/iamf.h    | 11 +++++++----
 libavutil/version.h |  2 +-
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index d00acac7e9..3131b38f02 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
 
 API changes, most recent first:
 
+2025-12-29 - xxxxxxxxxx - lavu 60.21.100 - iamf.h
+  Add nb_demixing_matrix to AVIAMFLayer
+
 2025-12-xx - xxxxxxxxxx - lavc 62.23.100 - coedc_id.h
   Add AV_CODEC_ID_JPEGXS.
 
diff --git a/libavutil/iamf.c b/libavutil/iamf.c
index 791954d951..c18069220e 100644
--- a/libavutil/iamf.c
+++ b/libavutil/iamf.c
@@ -239,6 +239,8 @@ AVIAMFParamDefinition *av_iamf_param_definition_alloc(enum 
AVIAMFParamDefinition
 //
 // Audio Element
 //
+static const AVOptionArrayDef demixing_matrix_def = { .def = "0|0", .size_max 
= (255 + 255) * 255, .sep = '|' };
+
 #undef OFFSET
 #define OFFSET(x) offsetof(AVIAMFLayer, x)
 static const AVOption layer_options[] = {
@@ -269,6 +271,8 @@ static const AVOption layer_options[] = {
                    { .i64 = AV_IAMF_AMBISONICS_MODE_MONO },       .unit = 
"ambisonics_mode" },
         { "projection", NULL, 0, AV_OPT_TYPE_CONST,
                    { .i64 = AV_IAMF_AMBISONICS_MODE_PROJECTION }, .unit = 
"ambisonics_mode" },
+    { "demixing_matrix", "set demixing_matrix", OFFSET(demixing_matrix), 
AV_OPT_TYPE_RATIONAL | AV_OPT_TYPE_FLAG_ARRAY,
+            { .arr = &demixing_matrix_def }, -1.0, 1.0, FLAGS },
     { NULL },
 };
 
diff --git a/libavutil/iamf.h b/libavutil/iamf.h
index 855f64280a..a755e7d682 100644
--- a/libavutil/iamf.h
+++ b/libavutil/iamf.h
@@ -330,14 +330,17 @@ typedef struct AVIAMFLayer {
     /**
      * Demixing matrix as defined in section 3.6.3 of IAMF.
      *
-     * The length of the array is ch_layout.nb_channels multiplied by the sum 
of
-     * the amount of streams in the group plus the amount of streams in the 
group
-     * that are stereo.
-     *
      * May be set only if @ref ambisonics_mode == 
AV_IAMF_AMBISONICS_MODE_PROJECTION,
      * must be NULL otherwise.
      */
     AVRational *demixing_matrix;
+
+    /**
+     * The length of the Demixing matrix array. Must be ch_layout.nb_channels 
multiplied
+     * by the sum of the amount of streams in the group plus the amount of 
streams in
+     * the group that are stereo.
+     */
+    unsigned int nb_demixing_matrix;
 } AVIAMFLayer;
 
 
diff --git a/libavutil/version.h b/libavutil/version.h
index fe76affb41..98f80df87b 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  60
-#define LIBAVUTIL_VERSION_MINOR  20
+#define LIBAVUTIL_VERSION_MINOR  21
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to