1 /*
2 * Immersive Audio Model and Formats common helpers and structs
3 * Copyright (c) 2023 James Almer <jamrial@gmail.com>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
26
30 // "Loudspeaker configuration for Sound System B"
32 // "Loudspeaker configuration for Sound System C"
34 // "Loudspeaker configuration for Sound System D"
36 // "Loudspeaker configuration for Sound System I"
38 // "Loudspeaker configuration for Sound System I" + Ltf + Rtf
40 // "Loudspeaker configuration for Sound System J"
42 // Front subset of "Loudspeaker configuration for Sound System J"
44 // Binaural
46 };
47
49 // The low-frequency effects subset (LFE) of "Loudspeaker configuration for Sound System J"
50 {
54 },
55 // The surround subset (Ls/Rs) of "Loudspeaker configuration for Sound System I"
56 {
57 .nb_channels = 2,
60 },
61 // The side surround subset (Lss/Rss) of "Loudspeaker configuration for Sound System J"
62 {
63 .nb_channels = 2,
66 },
67 // The rear surround subset (Lrs/Rrs) of "Loudspeaker configuration for Sound System J"
68 {
69 .nb_channels = 2,
72 },
73 // The top front subset (Ltf/Rtf) of "Loudspeaker configuration for Sound System J"
74 {
75 .nb_channels = 2,
78 },
79 // The top back subset (Ltb/Rtb) of "Loudspeaker configuration for Sound System J"
80 {
81 .nb_channels = 2,
84 },
85 // The top 4 channels (Ltf/Rtf/Ltb/Rtb) of "Loudspeaker configuration for Sound System J"
86 {
87 .nb_channels = 4,
91 },
92 // The front 3 channels (L/C/R) of "Loudspeaker configuration for Sound System J"
94 // Subset of "Loudspeaker configuration for Sound System H"
96 // Front subset of "Loudspeaker configuration for Sound System H"
98 // The side subset (SiL/SiR) of "Loudspeaker configuration for Sound System H"
99 {
100 .nb_channels = 2,
103 },
104 // The top side subset (TpSiL/TpSiR) of "Loudspeaker configuration for Sound System H"
105 {
106 .nb_channels = 2,
109 },
110 // The top 6 channels (TpFL/TpFR/TpSiL/TpSiR/TpBL/TpBR) of "Loudspeaker configuration for Sound System H"
111 {
112 .nb_channels = 6,
117 },
118 };
119
126 {
127 .nb_channels = 11,
130 },
131 },
141 };
142
144 {
146
147 if (!audio_element)
148 return;
149
156 }
157
159 {
161
162 if (!mix_presentation)
163 return;
164
170 }
171
173 {
175 return;
176
177 for (
int i = 0;
i <
c->nb_codec_configs;
i++) {
180 }
182 c->nb_codec_configs = 0;
183
184 for (
int i = 0;
i <
c->nb_audio_elements;
i++)
187 c->nb_audio_elements = 0;
188
189 for (
int i = 0;
i <
c->nb_mix_presentations;
i++)
192 c->nb_mix_presentations = 0;
193
194 for (
int i = 0;
i <
c->nb_param_definitions;
i++)
197 c->nb_param_definitions = 0;
198 }