FFmpeg 7.0.1
Loading...
Searching...
No Matches
iamf.h
Go to the documentation of this file.
1/*
2 * Immersive Audio Model and Formats helper functions and defines
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef AVUTIL_IAMF_H
22#define AVUTIL_IAMF_H
23
24/**
25 * @file
26 * Immersive Audio Model and Formats API header
27 * @see <a href="https://aomediacodec.github.io/iamf/">Immersive Audio Model and Formats</a>
28 */
29
30#include <stdint.h>
31#include <stddef.h>
32
33#include "attributes.h"
34#include "avassert.h"
35#include "channel_layout.h"
36#include "dict.h"
37#include "rational.h"
38
39/**
40 * @defgroup lavu_iamf_params Parameter Definition
41 * @{
42 * Parameters as defined in section 3.6.1 and 3.8 of IAMF.
43 * @}
44 * @defgroup lavu_iamf_audio Audio Element
45 * @{
46 * Audio Elements as defined in section 3.6 of IAMF.
47 * @}
48 * @defgroup lavu_iamf_mix Mix Presentation
49 * @{
50 * Mix Presentations as defined in section 3.7 of IAMF.
51 * @}
52 *
53 * @}
54 * @addtogroup lavu_iamf_params
55 * @{
56 */
62
63/**
64 * Mix Gain Parameter Data as defined in section 3.8.1 of IAMF.
65 *
66 * @note This struct's size is not a part of the public ABI.
67 */
68typedef struct AVIAMFMixGain {
70
71 /**
72 * Duration for the given subblock, in units of
73 * 1 / @ref AVIAMFParamDefinition.parameter_rate "parameter_rate".
74 * It must not be 0.
75 */
76 unsigned int subblock_duration;
77 /**
78 * The type of animation applied to the parameter values.
79 */
81 /**
82 * Parameter value that is applied at the start of the subblock.
83 * Applies to all defined Animation Types.
84 *
85 * Valid range of values is -128.0 to 128.0
86 */
88 /**
89 * Parameter value that is applied at the end of the subblock.
90 * Applies only to AV_IAMF_ANIMATION_TYPE_LINEAR and
91 * AV_IAMF_ANIMATION_TYPE_BEZIER Animation Types.
92 *
93 * Valid range of values is -128.0 to 128.0
94 */
96 /**
97 * Parameter value of the middle control point of a quadratic Bezier
98 * curve, i.e., its y-axis value.
99 * Applies only to AV_IAMF_ANIMATION_TYPE_BEZIER Animation Type.
100 *
101 * Valid range of values is -128.0 to 128.0
102 */
104 /**
105 * Parameter value of the time of the middle control point of a
106 * quadratic Bezier curve, i.e., its x-axis value.
107 * Applies only to AV_IAMF_ANIMATION_TYPE_BEZIER Animation Type.
108 *
109 * Valid range of values is 0.0 to 1.0
110 */
113
114/**
115 * Demixing Info Parameter Data as defined in section 3.8.2 of IAMF.
116 *
117 * @note This struct's size is not a part of the public ABI.
118 */
119typedef struct AVIAMFDemixingInfo {
121
122 /**
123 * Duration for the given subblock, in units of
124 * 1 / @ref AVIAMFParamDefinition.parameter_rate "parameter_rate".
125 * It must not be 0.
126 */
127 unsigned int subblock_duration;
128 /**
129 * Pre-defined combination of demixing parameters.
130 */
131 unsigned int dmixp_mode;
133
134/**
135 * Recon Gain Info Parameter Data as defined in section 3.8.3 of IAMF.
136 *
137 * @note This struct's size is not a part of the public ABI.
138 */
139typedef struct AVIAMFReconGain {
141
142 /**
143 * Duration for the given subblock, in units of
144 * 1 / @ref AVIAMFParamDefinition.parameter_rate "parameter_rate".
145 * It must not be 0.
146 */
147 unsigned int subblock_duration;
148
149 /**
150 * Array of gain values to be applied to each channel for each layer
151 * defined in the Audio Element referencing the parent Parameter Definition.
152 * Values for layers where the AV_IAMF_LAYER_FLAG_RECON_GAIN flag is not set
153 * are undefined.
154 *
155 * Channel order is: FL, C, FR, SL, SR, TFL, TFR, BL, BR, TBL, TBR, LFE
156 */
157 uint8_t recon_gain[6][12];
159
161 /**
162 * Subblocks are of struct type AVIAMFMixGain
163 */
165 /**
166 * Subblocks are of struct type AVIAMFDemixingInfo
167 */
169 /**
170 * Subblocks are of struct type AVIAMFReconGain
171 */
173};
174
175/**
176 * Parameters as defined in section 3.6.1 of IAMF.
177 *
178 * The struct is allocated by av_iamf_param_definition_alloc() along with an
179 * array of subblocks, its type depending on the value of type.
180 * This array is placed subblocks_offset bytes after the start of this struct.
181 *
182 * @note This struct's size is not a part of the public ABI.
183 */
184typedef struct AVIAMFParamDefinition {
186
187 /**
188 * Offset in bytes from the start of this struct, at which the subblocks
189 * array is located.
190 */
192 /**
193 * Size in bytes of each element in the subblocks array.
194 */
196 /**
197 * Number of subblocks in the array.
198 */
199 unsigned int nb_subblocks;
200
201 /**
202 * Parameters type. Determines the type of the subblock elements.
203 */
205
206 /**
207 * Identifier for the paremeter substream.
208 */
209 unsigned int parameter_id;
210 /**
211 * Sample rate for the paremeter substream. It must not be 0.
212 */
213 unsigned int parameter_rate;
214
215 /**
216 * The accumulated duration of all blocks in this parameter definition,
217 * in units of 1 / @ref parameter_rate.
218 *
219 * May be 0, in which case all duration values should be specified in
220 * another parameter definition referencing the same parameter_id.
221 */
222 unsigned int duration;
223 /**
224 * The duration of every subblock in the case where all subblocks, with
225 * the optional exception of the last subblock, have equal durations.
226 *
227 * Must be 0 if subblocks have different durations.
228 */
231
233
234/**
235 * Allocates memory for AVIAMFParamDefinition, plus an array of {@code nb_subblocks}
236 * amount of subblocks of the given type and initializes the variables. Can be
237 * freed with a normal av_free() call.
238 *
239 * @param size if non-NULL, the size in bytes of the resulting data array is written here.
240 */
242 unsigned int nb_subblocks, size_t *size);
243
244/**
245 * Get the subblock at the specified {@code idx}. Must be between 0 and nb_subblocks - 1.
246 *
247 * The @ref AVIAMFParamDefinition.type "param definition type" defines
248 * the struct type of the returned pointer.
249 */
250static av_always_inline void*
252{
253 av_assert0(idx < par->nb_subblocks);
254 return (void *)((uint8_t *)par + par->subblocks_offset + idx * par->subblock_size);
255}
256
257/**
258 * @}
259 * @addtogroup lavu_iamf_audio
260 * @{
261 */
262
267
268/**
269 * Recon gain information for the layer is present in AVIAMFReconGain
270 */
271#define AV_IAMF_LAYER_FLAG_RECON_GAIN (1 << 0)
272
273/**
274 * A layer defining a Channel Layout in the Audio Element.
275 *
276 * When @ref AVIAMFAudioElement.audio_element_type "the parent's Audio Element type"
277 * is AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL, this corresponds to an Scalable Channel
278 * Layout layer as defined in section 3.6.2 of IAMF.
279 * For AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE, it is an Ambisonics channel
280 * layout as defined in section 3.6.3 of IAMF.
281 *
282 * @note The struct should be allocated with av_iamf_audio_element_add_layer()
283 * and its size is not a part of the public ABI.
284 */
285typedef struct AVIAMFLayer {
287
289
290 /**
291 * A bitmask which may contain a combination of AV_IAMF_LAYER_FLAG_* flags.
292 */
293 unsigned int flags;
294 /**
295 * Output gain channel flags as defined in section 3.6.2 of IAMF.
296 *
297 * This field is defined only if @ref AVIAMFAudioElement.audio_element_type
298 * "the parent's Audio Element type" is AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL,
299 * must be 0 otherwise.
300 */
301 unsigned int output_gain_flags;
302 /**
303 * Output gain as defined in section 3.6.2 of IAMF.
304 *
305 * Must be 0 if @ref output_gain_flags is 0.
306 */
308 /**
309 * Ambisonics mode as defined in section 3.6.3 of IAMF.
310 *
311 * This field is defined only if @ref AVIAMFAudioElement.audio_element_type
312 * "the parent's Audio Element type" is AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE.
313 *
314 * If AV_IAMF_AMBISONICS_MODE_MONO, channel_mapping is defined implicitly
315 * (Ambisonic Order) or explicitly (Custom Order with ambi channels) in
316 * @ref ch_layout.
317 * If AV_IAMF_AMBISONICS_MODE_PROJECTION, @ref demixing_matrix must be set.
318 */
320
321 /**
322 * Demixing matrix as defined in section 3.6.3 of IAMF.
323 *
324 * The length of the array is ch_layout.nb_channels multiplied by the sum of
325 * the amount of streams in the group plus the amount of streams in the group
326 * that are stereo.
327 *
328 * May be set only if @ref ambisonics_mode == AV_IAMF_AMBISONICS_MODE_PROJECTION,
329 * must be NULL otherwise.
330 */
333
334
339
340/**
341 * Information on how to combine one or more audio streams, as defined in
342 * section 3.6 of IAMF.
343 *
344 * @note The struct should be allocated with av_iamf_audio_element_alloc()
345 * and its size is not a part of the public ABI.
346 */
347typedef struct AVIAMFAudioElement {
349
351 /**
352 * Number of layers, or channel groups, in the Audio Element.
353 * There may be 6 layers at most, and for @ref audio_element_type
354 * AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE, there may be exactly 1.
355 *
356 * Set by av_iamf_audio_element_add_layer(), must not be
357 * modified by any other code.
358 */
359 unsigned int nb_layers;
360
361 /**
362 * Demixing information used to reconstruct a scalable channel audio
363 * representation.
364 * The @ref AVIAMFParamDefinition.type "type" must be
365 * AV_IAMF_PARAMETER_DEFINITION_DEMIXING.
366 */
368 /**
369 * Recon gain information used to reconstruct a scalable channel audio
370 * representation.
371 * The @ref AVIAMFParamDefinition.type "type" must be
372 * AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN.
373 */
375
376 /**
377 * Audio element type as defined in section 3.6 of IAMF.
378 */
380
381 /**
382 * Default weight value as defined in section 3.6 of IAMF.
383 */
384 unsigned int default_w;
386
388
389/**
390 * Allocates a AVIAMFAudioElement, and initializes its fields with default values.
391 * No layers are allocated. Must be freed with av_iamf_audio_element_free().
392 *
393 * @see av_iamf_audio_element_add_layer()
394 */
396
397/**
398 * Allocate a layer and add it to a given AVIAMFAudioElement.
399 * It is freed by av_iamf_audio_element_free() alongside the rest of the parent
400 * AVIAMFAudioElement.
401 *
402 * @return a pointer to the allocated layer.
403 */
405
406/**
407 * Free an AVIAMFAudioElement and all its contents.
408 *
409 * @param audio_element pointer to pointer to an allocated AVIAMFAudioElement.
410 * upon return, *audio_element will be set to NULL.
411 */
413
414/**
415 * @}
416 * @addtogroup lavu_iamf_mix
417 * @{
418 */
419
421 /**
422 * The referenced Audio Element shall be rendered to stereo loudspeakers.
423 */
425 /**
426 * The referenced Audio Element shall be rendered with a binaural renderer.
427 */
429};
430
431/**
432 * Submix element as defined in section 3.7 of IAMF.
433 *
434 * @note The struct should be allocated with av_iamf_submix_add_element()
435 * and its size is not a part of the public ABI.
436 */
437typedef struct AVIAMFSubmixElement {
439
440 /**
441 * The id of the Audio Element this submix element references.
442 */
443 unsigned int audio_element_id;
444
445 /**
446 * Information required required for applying any processing to the
447 * referenced and rendered Audio Element before being summed with other
448 * processed Audio Elements.
449 * The @ref AVIAMFParamDefinition.type "type" must be
450 * AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN.
451 */
453
454 /**
455 * Default mix gain value to apply when there are no AVIAMFParamDefinition
456 * with @ref element_mix_config "element_mix_config's"
457 * @ref AVIAMFParamDefinition.parameter_id "parameter_id" available for a
458 * given audio frame.
459 */
461
462 /**
463 * A value that indicates whether the referenced channel-based Audio Element
464 * shall be rendered to stereo loudspeakers or spatialized with a binaural
465 * renderer when played back on headphones.
466 * If the Audio Element is not of @ref AVIAMFAudioElement.audio_element_type
467 * "type" AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL, then this field is undefined.
468 */
470
471 /**
472 * A dictionary of strings describing the submix in different languages.
473 * Must have the same amount of entries as
474 * @ref AVIAMFMixPresentation.annotations "the mix's annotations", stored
475 * in the same order, and with the same key strings.
476 *
477 * @ref AVDictionaryEntry.key "key" is a string conforming to BCP-47 that
478 * specifies the language for the string stored in
479 * @ref AVDictionaryEntry.value "value".
480 */
483
485 /**
486 * The layout follows the loudspeaker sound system convention of ITU-2051-3.
487 */
489 /**
490 * The layout is binaural.
491 */
493};
494
495/**
496 * Submix layout as defined in section 3.7.6 of IAMF.
497 *
498 * @note The struct should be allocated with av_iamf_submix_add_layout()
499 * and its size is not a part of the public ABI.
500 */
501typedef struct AVIAMFSubmixLayout {
503
505
506 /**
507 * Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus
508 * 7.1.2ch and 3.1.2ch
509 * If layout_type is not AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS, this field
510 * is undefined.
511 */
513 /**
514 * The program integrated loudness information, as defined in
515 * ITU-1770-4.
516 */
518 /**
519 * The digital (sampled) peak value of the audio signal, as defined
520 * in ITU-1770-4.
521 */
523 /**
524 * The true peak of the audio signal, as defined in ITU-1770-4.
525 */
527 /**
528 * The Dialogue loudness information, as defined in ITU-1770-4.
529 */
531 /**
532 * The Album loudness information, as defined in ITU-1770-4.
533 */
536
537/**
538 * Submix layout as defined in section 3.7 of IAMF.
539 *
540 * @note The struct should be allocated with av_iamf_mix_presentation_add_submix()
541 * and its size is not a part of the public ABI.
542 */
543typedef struct AVIAMFSubmix {
545
546 /**
547 * Array of submix elements.
548 *
549 * Set by av_iamf_submix_add_element(), must not be modified by any
550 * other code.
551 */
553 /**
554 * Number of elements in the submix.
555 *
556 * Set by av_iamf_submix_add_element(), must not be modified by any
557 * other code.
558 */
559 unsigned int nb_elements;
560
561 /**
562 * Array of submix layouts.
563 *
564 * Set by av_iamf_submix_add_layout(), must not be modified by any
565 * other code.
566 */
568 /**
569 * Number of layouts in the submix.
570 *
571 * Set by av_iamf_submix_add_layout(), must not be modified by any
572 * other code.
573 */
574 unsigned int nb_layouts;
575
576 /**
577 * Information required for post-processing the mixed audio signal to
578 * generate the audio signal for playback.
579 * The @ref AVIAMFParamDefinition.type "type" must be
580 * AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN.
581 */
583
584 /**
585 * Default mix gain value to apply when there are no AVIAMFParamDefinition
586 * with @ref output_mix_config "output_mix_config's"
587 * @ref AVIAMFParamDefinition.parameter_id "parameter_id" available for a
588 * given audio frame.
589 */
592
593/**
594 * Information on how to render and mix one or more AVIAMFAudioElement to generate
595 * the final audio output, as defined in section 3.7 of IAMF.
596 *
597 * @note The struct should be allocated with av_iamf_mix_presentation_alloc()
598 * and its size is not a part of the public ABI.
599 */
600typedef struct AVIAMFMixPresentation {
602
603 /**
604 * Array of submixes.
605 *
606 * Set by av_iamf_mix_presentation_add_submix(), must not be modified
607 * by any other code.
608 */
610 /**
611 * Number of submixes in the presentation.
612 *
613 * Set by av_iamf_mix_presentation_add_submix(), must not be modified
614 * by any other code.
615 */
616 unsigned int nb_submixes;
617
618 /**
619 * A dictionary of strings describing the mix in different languages.
620 * Must have the same amount of entries as every
621 * @ref AVIAMFSubmixElement.annotations "Submix element annotations",
622 * stored in the same order, and with the same key strings.
623 *
624 * @ref AVDictionaryEntry.key "key" is a string conforming to BCP-47
625 * that specifies the language for the string stored in
626 * @ref AVDictionaryEntry.value "value".
627 */
630
632
633/**
634 * Allocates a AVIAMFMixPresentation, and initializes its fields with default
635 * values. No submixes are allocated.
636 * Must be freed with av_iamf_mix_presentation_free().
637 *
638 * @see av_iamf_mix_presentation_add_submix()
639 */
641
642/**
643 * Allocate a submix and add it to a given AVIAMFMixPresentation.
644 * It is freed by av_iamf_mix_presentation_free() alongside the rest of the
645 * parent AVIAMFMixPresentation.
646 *
647 * @return a pointer to the allocated submix.
648 */
650
651/**
652 * Allocate a submix element and add it to a given AVIAMFSubmix.
653 * It is freed by av_iamf_mix_presentation_free() alongside the rest of the
654 * parent AVIAMFSubmix.
655 *
656 * @return a pointer to the allocated submix.
657 */
659
660/**
661 * Allocate a submix layout and add it to a given AVIAMFSubmix.
662 * It is freed by av_iamf_mix_presentation_free() alongside the rest of the
663 * parent AVIAMFSubmix.
664 *
665 * @return a pointer to the allocated submix.
666 */
668
669/**
670 * Free an AVIAMFMixPresentation and all its contents.
671 *
672 * @param mix_presentation pointer to pointer to an allocated AVIAMFMixPresentation.
673 * upon return, *mix_presentation will be set to NULL.
674 */
676/**
677 * @}
678 */
679
680#endif /* AVUTIL_IAMF_H */
Macro definitions for various function/variable attributes.
#define av_always_inline
Definition attributes.h:45
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition avassert.h:40
Public libavutil channel layout APIs header.
Public dictionary API.
struct AVDictionary AVDictionary
Definition dict.h:94
AVIAMFLayer * av_iamf_audio_element_add_layer(AVIAMFAudioElement *audio_element)
Allocate a layer and add it to a given AVIAMFAudioElement.
AVIAMFAmbisonicsMode
Definition iamf.h:263
const AVClass * av_iamf_audio_element_get_class(void)
AVIAMFAudioElementType
Definition iamf.h:335
void av_iamf_audio_element_free(AVIAMFAudioElement **audio_element)
Free an AVIAMFAudioElement and all its contents.
AVIAMFAudioElement * av_iamf_audio_element_alloc(void)
Allocates a AVIAMFAudioElement, and initializes its fields with default values.
@ AV_IAMF_AMBISONICS_MODE_MONO
Definition iamf.h:264
@ AV_IAMF_AMBISONICS_MODE_PROJECTION
Definition iamf.h:265
@ AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE
Definition iamf.h:337
@ AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL
Definition iamf.h:336
AVIAMFHeadphonesMode
Definition iamf.h:420
AVIAMFSubmixLayout * av_iamf_submix_add_layout(AVIAMFSubmix *submix)
Allocate a submix layout and add it to a given AVIAMFSubmix.
void av_iamf_mix_presentation_free(AVIAMFMixPresentation **mix_presentation)
Free an AVIAMFMixPresentation and all its contents.
AVIAMFMixPresentation * av_iamf_mix_presentation_alloc(void)
Allocates a AVIAMFMixPresentation, and initializes its fields with default values.
AVIAMFSubmix * av_iamf_mix_presentation_add_submix(AVIAMFMixPresentation *mix_presentation)
Allocate a submix and add it to a given AVIAMFMixPresentation.
AVIAMFSubmixElement * av_iamf_submix_add_element(AVIAMFSubmix *submix)
Allocate a submix element and add it to a given AVIAMFSubmix.
AVIAMFSubmixLayoutType
Definition iamf.h:484
const AVClass * av_iamf_mix_presentation_get_class(void)
@ AV_IAMF_HEADPHONES_MODE_STEREO
The referenced Audio Element shall be rendered to stereo loudspeakers.
Definition iamf.h:424
@ AV_IAMF_HEADPHONES_MODE_BINAURAL
The referenced Audio Element shall be rendered with a binaural renderer.
Definition iamf.h:428
@ AV_IAMF_SUBMIX_LAYOUT_TYPE_BINAURAL
The layout is binaural.
Definition iamf.h:492
@ AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS
The layout follows the loudspeaker sound system convention of ITU-2051-3.
Definition iamf.h:488
static av_always_inline void * av_iamf_param_definition_get_subblock(const AVIAMFParamDefinition *par, unsigned int idx)
Get the subblock at the specified idx.
Definition iamf.h:251
AVIAMFParamDefinitionType
Definition iamf.h:160
const AVClass * av_iamf_param_definition_get_class(void)
AVIAMFParamDefinition * av_iamf_param_definition_alloc(enum AVIAMFParamDefinitionType type, unsigned int nb_subblocks, size_t *size)
Allocates memory for AVIAMFParamDefinition, plus an array of nb_subblocks amount of subblocks of the ...
AVIAMFAnimationType
Definition iamf.h:57
@ AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN
Subblocks are of struct type AVIAMFReconGain.
Definition iamf.h:172
@ AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN
Subblocks are of struct type AVIAMFMixGain.
Definition iamf.h:164
@ AV_IAMF_PARAMETER_DEFINITION_DEMIXING
Subblocks are of struct type AVIAMFDemixingInfo.
Definition iamf.h:168
@ AV_IAMF_ANIMATION_TYPE_BEZIER
Definition iamf.h:60
@ AV_IAMF_ANIMATION_TYPE_LINEAR
Definition iamf.h:59
@ AV_IAMF_ANIMATION_TYPE_STEP
Definition iamf.h:58
Utilties for rational number calculation.
An AVChannelLayout holds information about the channel layout of audio data.
Describe the class of an AVClass context structure.
Definition log.h:66
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
Definition iamf.h:347
enum AVIAMFAudioElementType audio_element_type
Audio element type as defined in section 3.6 of IAMF.
Definition iamf.h:379
const AVClass * av_class
Definition iamf.h:348
AVIAMFParamDefinition * recon_gain_info
Recon gain information used to reconstruct a scalable channel audio representation.
Definition iamf.h:374
unsigned int default_w
Default weight value as defined in section 3.6 of IAMF.
Definition iamf.h:384
AVIAMFParamDefinition * demixing_info
Demixing information used to reconstruct a scalable channel audio representation.
Definition iamf.h:367
AVIAMFLayer ** layers
Definition iamf.h:350
unsigned int nb_layers
Number of layers, or channel groups, in the Audio Element.
Definition iamf.h:359
Demixing Info Parameter Data as defined in section 3.8.2 of IAMF.
Definition iamf.h:119
unsigned int dmixp_mode
Pre-defined combination of demixing parameters.
Definition iamf.h:131
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
Definition iamf.h:127
const AVClass * av_class
Definition iamf.h:120
A layer defining a Channel Layout in the Audio Element.
Definition iamf.h:285
unsigned int flags
A bitmask which may contain a combination of AV_IAMF_LAYER_FLAG_* flags.
Definition iamf.h:293
unsigned int output_gain_flags
Output gain channel flags as defined in section 3.6.2 of IAMF.
Definition iamf.h:301
enum AVIAMFAmbisonicsMode ambisonics_mode
Ambisonics mode as defined in section 3.6.3 of IAMF.
Definition iamf.h:319
const AVClass * av_class
Definition iamf.h:286
AVRational * demixing_matrix
Demixing matrix as defined in section 3.6.3 of IAMF.
Definition iamf.h:331
AVChannelLayout ch_layout
Definition iamf.h:288
AVRational output_gain
Output gain as defined in section 3.6.2 of IAMF.
Definition iamf.h:307
Mix Gain Parameter Data as defined in section 3.8.1 of IAMF.
Definition iamf.h:68
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
Definition iamf.h:76
AVRational start_point_value
Parameter value that is applied at the start of the subblock.
Definition iamf.h:87
AVRational control_point_value
Parameter value of the middle control point of a quadratic Bezier curve, i.e., its y-axis value.
Definition iamf.h:103
AVRational end_point_value
Parameter value that is applied at the end of the subblock.
Definition iamf.h:95
enum AVIAMFAnimationType animation_type
The type of animation applied to the parameter values.
Definition iamf.h:80
const AVClass * av_class
Definition iamf.h:69
AVRational control_point_relative_time
Parameter value of the time of the middle control point of a quadratic Bezier curve,...
Definition iamf.h:111
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
Definition iamf.h:600
unsigned int nb_submixes
Number of submixes in the presentation.
Definition iamf.h:616
const AVClass * av_class
Definition iamf.h:601
AVDictionary * annotations
A dictionary of strings describing the mix in different languages.
Definition iamf.h:628
AVIAMFSubmix ** submixes
Array of submixes.
Definition iamf.h:609
Parameters as defined in section 3.6.1 of IAMF.
Definition iamf.h:184
unsigned int parameter_rate
Sample rate for the paremeter substream.
Definition iamf.h:213
size_t subblocks_offset
Offset in bytes from the start of this struct, at which the subblocks array is located.
Definition iamf.h:191
const AVClass * av_class
Definition iamf.h:185
size_t subblock_size
Size in bytes of each element in the subblocks array.
Definition iamf.h:195
unsigned int duration
The accumulated duration of all blocks in this parameter definition, in units of 1 / parameter_rate.
Definition iamf.h:222
unsigned int constant_subblock_duration
The duration of every subblock in the case where all subblocks, with the optional exception of the la...
Definition iamf.h:229
unsigned int parameter_id
Identifier for the paremeter substream.
Definition iamf.h:209
enum AVIAMFParamDefinitionType type
Parameters type.
Definition iamf.h:204
unsigned int nb_subblocks
Number of subblocks in the array.
Definition iamf.h:199
Recon Gain Info Parameter Data as defined in section 3.8.3 of IAMF.
Definition iamf.h:139
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
Definition iamf.h:147
uint8_t recon_gain[6][12]
Array of gain values to be applied to each channel for each layer defined in the Audio Element refere...
Definition iamf.h:157
const AVClass * av_class
Definition iamf.h:140
Submix element as defined in section 3.7 of IAMF.
Definition iamf.h:437
AVIAMFParamDefinition * element_mix_config
Information required required for applying any processing to the referenced and rendered Audio Elemen...
Definition iamf.h:452
const AVClass * av_class
Definition iamf.h:438
unsigned int audio_element_id
The id of the Audio Element this submix element references.
Definition iamf.h:443
AVDictionary * annotations
A dictionary of strings describing the submix in different languages.
Definition iamf.h:481
enum AVIAMFHeadphonesMode headphones_rendering_mode
A value that indicates whether the referenced channel-based Audio Element shall be rendered to stereo...
Definition iamf.h:469
AVRational default_mix_gain
Default mix gain value to apply when there are no AVIAMFParamDefinition with element_mix_config's par...
Definition iamf.h:460
Submix layout as defined in section 3.7.6 of IAMF.
Definition iamf.h:501
AVRational true_peak
The true peak of the audio signal, as defined in ITU-1770-4.
Definition iamf.h:526
AVRational digital_peak
The digital (sampled) peak value of the audio signal, as defined in ITU-1770-4.
Definition iamf.h:522
enum AVIAMFSubmixLayoutType layout_type
Definition iamf.h:504
AVRational dialogue_anchored_loudness
The Dialogue loudness information, as defined in ITU-1770-4.
Definition iamf.h:530
AVRational album_anchored_loudness
The Album loudness information, as defined in ITU-1770-4.
Definition iamf.h:534
AVRational integrated_loudness
The program integrated loudness information, as defined in ITU-1770-4.
Definition iamf.h:517
AVChannelLayout sound_system
Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus 7.1.2ch and 3....
Definition iamf.h:512
const AVClass * av_class
Definition iamf.h:502
Submix layout as defined in section 3.7 of IAMF.
Definition iamf.h:543
AVRational default_mix_gain
Default mix gain value to apply when there are no AVIAMFParamDefinition with output_mix_config's para...
Definition iamf.h:590
unsigned int nb_elements
Number of elements in the submix.
Definition iamf.h:559
AVIAMFSubmixElement ** elements
Array of submix elements.
Definition iamf.h:552
AVIAMFSubmixLayout ** layouts
Array of submix layouts.
Definition iamf.h:567
AVIAMFParamDefinition * output_mix_config
Information required for post-processing the mixed audio signal to generate the audio signal for play...
Definition iamf.h:582
const AVClass * av_class
Definition iamf.h:544
unsigned int nb_layouts
Number of layouts in the submix.
Definition iamf.h:574
Rational number (pair of numerator and denominator).
Definition rational.h:58