万箭穿心是什么意思| 花儿为什么这样红简谱| 抗锯齿是什么意思| 灵芝和什么煲汤好| 86年属什么的生肖| 突然长胖很多是什么原因| 龙和什么生肖相冲| 空腔是什么意思| 两个山念什么| 安溪铁观音属于什么茶| hcg值是什么| 甲功七项检查什么| 孕妇奶粉什么时候开始喝最好| 排卵试纸强阳说明什么| 甲沟炎是什么| ami是什么意思| 脚后跟疼挂什么科| 香蕉与什么食物相克| 菊花不能和什么一起吃| 心机血缺血是什么症状| 本加一笔是什么字| 酸菜吃多了有什么危害| 什么是烟雾病| dsa什么意思| 牙龈发炎肿痛吃什么药| 为什么腋窝老是出汗| 康庄大道是什么意思| 豆浆喝多了有什么副作用| 破卵针是什么| 尿有泡沫是什么原因| 花对什么| 供血不足吃什么药好| hpv检查是什么| 白兰地兑什么饮料好喝| 锦囊妙计是什么意思| 血气分析是检查什么的| 梅菌是什么病| 坐立不安是什么意思| 过敏性皮炎吃什么药| 艾地苯醌片治什么病| 手背有痣代表什么意思| 梦见自己洗头发是什么意思| 什么样的人容易垂体瘤| 田可以加什么偏旁| 白居易是诗什么| 舌吻有什么好处| 些几 是什么意思| 怀孕后为什么会生化| 假酒喝了有什么症状| 自叹不如什么意思| 井盖为什么是圆的| 白菜什么时候播种| 蠼螋吃什么| 农历闰月有什么规律| 什么姿势最舒服| 痣是什么| 中国的母亲河是什么河| 晚上吃什么水果减肥效果最好| 成龙真名叫什么名字| 房间为什么有蟑螂| 寒凝血瘀吃什么中成药| 坚强后盾是什么意思| 为什么会有子宫肌瘤| 寻常疣是什么原因造成的| 1955年出生属什么| 缩量十字星意味着什么| 9月3号是什么纪念日| 元帅相当于现在什么官| 中药地龙是什么| 回族不能吃什么肉| 破冰是什么意思| 一去不返是什么生肖| 锦囊妙计是什么意思| 天罗地网是什么生肖| 一什么正什么| 橱柜用什么材料好| 梦见出国了是什么意思| 梅毒早期什么症状| 曙光是什么意思| 既什么又什么| 空气缸是什么意思| 人次是什么意思| 盐酸莫西沙星主治什么| 眼球有黑色斑点是什么| 八段锦是什么| 固液法白酒是什么意思| 老人吃饭老是噎着是什么原因| g1p1是什么意思| 活珠子是什么| 张予曦为什么像混血| 出殡下雨是什么兆头| 口红是什么做的| 水瓶座的幸运色是什么颜色| 21三体临界风险是什么意思| 汆水是什么意思| 萧何字什么| 什么的东西| 科级干部是什么级别| 100聚酯纤维是什么面料| 出殡下雨是什么兆头| 铁是什么颜色的| 孕妇生气对胎儿有什么影响| 宝宝不喝奶是什么原因| 宫颈病变有什么症状| 脸书是什么| 疱疹性咽峡炎是什么引起的| 巴雷特是什么| 老人高烧不退是什么原因| 小便无力是什么原因男| 脸发麻是什么病的前兆| 手机号码是什么| rip是什么意思| 婴幼儿吃什么奶粉好| 水保是什么| 什么叫前庭功能| 单宁是什么| 蜂王浆是什么东西| 一个黑一个出读什么| 胃部间质瘤是什么性质的瘤| 伊朗说什么语言| 高粱是什么颜色| 为什么女人要带阴环| 胎盘能吃吗有什么作用与功效| 命里有时终须有命里无时莫强求什么意思| 乳和霜有什么区别| 湖北人喜欢吃什么菜| 什么叫代孕| 右手大拇指抖动是什么原因| 脚心疼什么原因| 眼睛长结石是什么原因引起的| 男人前列腺炎有什么症状表现| 绿茶什么时候喝最好| 男人少精弱精吃什么补最好| 党内警告处分有什么影响| qeelin是什么牌子| 婆媳关系为什么难相处| 3月21是什么星座| 蛇的天敌是什么| 孩子注意力不集中缺什么微量元素| 奥美拉唑是治什么病的| 10月30号什么星座| 滑精是什么症状| 朱祁镇为什么杀于谦| 尿液阳性是什么意思| 胃胀吃点什么药| 黄色加蓝色等于什么颜色| 什么是同房| 车辆购置税什么时候交| 小腹痛吃什么药| 脐血流检查是什么| 老年人吃什么钙片补钙好| 系统是什么| 2016年属什么生肖| 医院院长是什么级别| 肾结石是什么引起的| 心口疼挂什么科| 什么是二次元| 为什么屁多是什么原因| 什么的钩住| 烟台有什么特产| 什么酒不能喝| 鸡的祖先是什么| 重庆市长什么级别| 肝胃不和吃什么药| 笔记本电脑什么牌子好| 蓝颜知己是什么关系| 吃什么能生精和提高精子质量| 隐翅虫是什么样子| 9月10日是什么日子| 喜气洋洋是什么意思| 绿豆芽炒什么好吃| 表姐的儿子叫我什么| 88年属什么的生肖| 1226是什么星座| 珩五行属什么| 什么海翻江| romantic什么意思| 金骏眉属于什么茶类| 七月二十八什么星座| 蜂王浆是什么味道| 肛裂用什么药| 早搏心律不齐吃什么药| 下午四五点是什么时辰| 琏是什么意思| 白芨有什么作用和功效| 外交部部长是什么级别| 每天流鼻血是什么原因| 腿水肿是什么原因| 古曼童是什么| 内膜增厚是什么原因| 拉屎为什么是绿色的| 大便干吃什么药| 什么东西越热越爱出来| 桥本是什么意思| 蜘蛛属于什么类动物| 拔完智齿后需要注意什么| 午夜是什么意思| 喝什么解酒快| 月经来头疼是什么原因引起的| 弯刀裤适合什么人穿| 卤蛋吃多了有什么危害| 什么的荷叶| 支抗钉是什么| 什么的少年| 日出扶桑是什么意思| 什么东西补锌| 松子是什么树的果实| 白泽长什么样| 办理身份证需要带什么| 怨妇是什么意思| 荣辱与共是什么意思| 肾有结晶是什么意思| 福州有什么好吃的| 什么东西越生气越大| 吃黄瓜有什么好处和坏处| 肺肾两虚吃什么中成药| 莒姬是什么位分| 为什么医生说直肠炎不用吃药| 海笋是什么东西| 宝宝咳嗽吃什么药好| 狐臭什么味| 梦到伟人有什么兆头| 恪尽职守是什么意思| 参透是什么意思| 什么是玛瑙| b驾照能开什么车| nice什么意思| 舞蹈症是什么病| 复方对乙酰氨基酚片是什么药| 甲状腺不均质改变是什么意思| 感冒低烧吃什么药| 8月5日是什么星座| 婴儿什么时候可以吃盐| 颢读什么| 洋溢着什么样的笑容| 核辐射是什么| 一点点奶茶什么最好喝| 荆州有什么大学| 卜姓氏读什么| 幽门螺旋杆菌吃什么药最好| 山海经讲的是什么| 地蛋是什么| 为什么睾丸一边大一边小| 坏是什么意思| 脾切除后有什么影响| 低回声结节什么意思| 骆驼是什么牌子| 流水生财是什么意思| 宫颈肥大是什么原因造成的| 萨德事件是什么意思| 医生说忌生冷是指什么| 乌龟不能吃什么| 什么的阳光| 忠实是什么意思| 高中生吃什么提高记忆力| 葫芦什么时候开花| 吃什么东西排酸最快| 更迭是什么意思| 民兵是干什么的| 肾结石长什么样子图片| 芭菲是什么| 什么意思| 修身养性下一句是什么| 信手拈来是什么意思| 百度

工业和信息化部约谈环保违规车辆生产企业


Directory: ../../../ffmpeg/
File: src/libavformat/iamf.c
Date: 2025-08-04 00:43:16
Exec Total Coverage
Lines: 36 39 92.3%
Functions: 3 3 100.0%
Branches: 15 18 83.3%

Line Branch Exec Source
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
22 #include "libavutil/channel_layout.h"
23 #include "libavutil/iamf.h"
24 #include "libavutil/mem.h"
25 #include "iamf.h"
26
27 const AVChannelLayout ff_iamf_scalable_ch_layouts[10] = {
28 AV_CHANNEL_LAYOUT_MONO,
29 AV_CHANNEL_LAYOUT_STEREO,
30 // "Loudspeaker configuration for Sound System B"
31 AV_CHANNEL_LAYOUT_5POINT1,
32 // "Loudspeaker configuration for Sound System C"
33 AV_CHANNEL_LAYOUT_5POINT1POINT2,
34 // "Loudspeaker configuration for Sound System D"
35 AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK,
36 // "Loudspeaker configuration for Sound System I"
37 AV_CHANNEL_LAYOUT_7POINT1,
38 // "Loudspeaker configuration for Sound System I" + Ltf + Rtf
39 AV_CHANNEL_LAYOUT_7POINT1POINT2,
40 // "Loudspeaker configuration for Sound System J"
41 AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK,
42 // Front subset of "Loudspeaker configuration for Sound System J"
43 AV_CHANNEL_LAYOUT_3POINT1POINT2,
44 // Binaural
45 AV_CHANNEL_LAYOUT_BINAURAL,
46 };
47
48 const AVChannelLayout ff_iamf_expanded_scalable_ch_layouts[13] = {
49 // The low-frequency effects subset (LFE) of "Loudspeaker configuration for Sound System J"
50 {
51 .nb_channels = 1,
52 .order = AV_CHANNEL_ORDER_NATIVE,
53 .u.mask = AV_CH_LOW_FREQUENCY,
54 },
55 // The surround subset (Ls/Rs) of "Loudspeaker configuration for Sound System I"
56 {
57 .nb_channels = 2,
58 .order = AV_CHANNEL_ORDER_NATIVE,
59 .u.mask = AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT,
60 },
61 // The side surround subset (Lss/Rss) of "Loudspeaker configuration for Sound System J"
62 {
63 .nb_channels = 2,
64 .order = AV_CHANNEL_ORDER_NATIVE,
65 .u.mask = AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT,
66 },
67 // The rear surround subset (Lrs/Rrs) of "Loudspeaker configuration for Sound System J"
68 {
69 .nb_channels = 2,
70 .order = AV_CHANNEL_ORDER_NATIVE,
71 .u.mask = AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT,
72 },
73 // The top front subset (Ltf/Rtf) of "Loudspeaker configuration for Sound System J"
74 {
75 .nb_channels = 2,
76 .order = AV_CHANNEL_ORDER_NATIVE,
77 .u.mask = AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT,
78 },
79 // The top back subset (Ltb/Rtb) of "Loudspeaker configuration for Sound System J"
80 {
81 .nb_channels = 2,
82 .order = AV_CHANNEL_ORDER_NATIVE,
83 .u.mask = AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT,
84 },
85 // The top 4 channels (Ltf/Rtf/Ltb/Rtb) of "Loudspeaker configuration for Sound System J"
86 {
87 .nb_channels = 4,
88 .order = AV_CHANNEL_ORDER_NATIVE,
89 .u.mask = AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT |
90 AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT,
91 },
92 // The front 3 channels (L/C/R) of "Loudspeaker configuration for Sound System J"
93 AV_CHANNEL_LAYOUT_SURROUND,
94 // Subset of "Loudspeaker configuration for Sound System H"
95 AV_CHANNEL_LAYOUT_9POINT1POINT6,
96 // Front subset of "Loudspeaker configuration for Sound System H"
97 AV_CHANNEL_LAYOUT_STEREO,
98 // The side subset (SiL/SiR) of "Loudspeaker configuration for Sound System H"
99 {
100 .nb_channels = 2,
101 .order = AV_CHANNEL_ORDER_NATIVE,
102 .u.mask = AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT,
103 },
104 // The top side subset (TpSiL/TpSiR) of "Loudspeaker configuration for Sound System H"
105 {
106 .nb_channels = 2,
107 .order = AV_CHANNEL_ORDER_NATIVE,
108 .u.mask = AV_CH_TOP_SIDE_LEFT | AV_CH_TOP_SIDE_RIGHT,
109 },
110 // The top 6 channels (TpFL/TpFR/TpSiL/TpSiR/TpBL/TpBR) of "Loudspeaker configuration for Sound System H"
111 {
112 .nb_channels = 6,
113 .order = AV_CHANNEL_ORDER_NATIVE,
114 .u.mask = AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT |
115 AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT |
116 AV_CH_TOP_SIDE_LEFT | AV_CH_TOP_SIDE_RIGHT,
117 },
118 };
119
120 const struct IAMFSoundSystemMap ff_iamf_sound_system_map[14] = {
121 { SOUND_SYSTEM_A_0_2_0, AV_CHANNEL_LAYOUT_STEREO },
122 { SOUND_SYSTEM_B_0_5_0, AV_CHANNEL_LAYOUT_5POINT1 },
123 { SOUND_SYSTEM_C_2_5_0, AV_CHANNEL_LAYOUT_5POINT1POINT2 },
124 { SOUND_SYSTEM_D_4_5_0, AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK },
125 { SOUND_SYSTEM_E_4_5_1,
126 {
127 .nb_channels = 11,
128 .order = AV_CHANNEL_ORDER_NATIVE,
129 .u.mask = AV_CH_LAYOUT_5POINT1POINT4_BACK | AV_CH_BOTTOM_FRONT_CENTER,
130 },
131 },
132 { SOUND_SYSTEM_F_3_7_0, AV_CHANNEL_LAYOUT_7POINT2POINT3 },
133 { SOUND_SYSTEM_G_4_9_0, AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK },
134 { SOUND_SYSTEM_H_9_10_3, AV_CHANNEL_LAYOUT_22POINT2 },
135 { SOUND_SYSTEM_I_0_7_0, AV_CHANNEL_LAYOUT_7POINT1 },
136 { SOUND_SYSTEM_J_4_7_0, AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK },
137 { SOUND_SYSTEM_10_2_7_0, AV_CHANNEL_LAYOUT_7POINT1POINT2 },
138 { SOUND_SYSTEM_11_2_3_0, AV_CHANNEL_LAYOUT_3POINT1POINT2 },
139 { SOUND_SYSTEM_12_0_1_0, AV_CHANNEL_LAYOUT_MONO },
140 { SOUND_SYSTEM_13_9_1_6, AV_CHANNEL_LAYOUT_9POINT1POINT6 },
141 };
142
143 41 void ff_iamf_free_audio_element(IAMFAudioElement **paudio_element)
144 {
145 41 IAMFAudioElement *audio_element = *paudio_element;
146
147
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 41 times.
41 if (!audio_element)
148 return;
149
150
2/2
✓ Branch 0 taken 185 times.
✓ Branch 1 taken 41 times.
226 for (int i = 0; i < audio_element->nb_substreams; i++)
151 185 avcodec_parameters_free(&audio_element->substreams[i].codecpar);
152 41 av_free(audio_element->substreams);
153 41 av_free(audio_element->layers);
154 41 av_iamf_audio_element_free(&audio_element->element);
155 41 av_freep(paudio_element);
156 }
157
158 38 void ff_iamf_free_mix_presentation(IAMFMixPresentation **pmix_presentation)
159 {
160 38 IAMFMixPresentation *mix_presentation = *pmix_presentation;
161
162
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 38 times.
38 if (!mix_presentation)
163 return;
164
165
2/2
✓ Branch 0 taken 27 times.
✓ Branch 1 taken 38 times.
65 for (int i = 0; i < mix_presentation->count_label; i++)
166 27 av_free(mix_presentation->language_label[i]);
167 38 av_free(mix_presentation->language_label);
168 38 av_iamf_mix_presentation_free(&mix_presentation->mix);
169 38 av_freep(pmix_presentation);
170 }
171
172 38 void ff_iamf_uninit_context(IAMFContext *c)
173 {
174
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 38 times.
38 if (!c)
175 return;
176
177
2/2
✓ Branch 0 taken 38 times.
✓ Branch 1 taken 38 times.
76 for (int i = 0; i < c->nb_codec_configs; i++) {
178 38 av_free(c->codec_configs[i]->extradata);
179 38 av_free(c->codec_configs[i]);
180 }
181 38 av_freep(&c->codec_configs);
182 38 c->nb_codec_configs = 0;
183
184
2/2
✓ Branch 0 taken 41 times.
✓ Branch 1 taken 38 times.
79 for (int i = 0; i < c->nb_audio_elements; i++)
185 41 ff_iamf_free_audio_element(&c->audio_elements[i]);
186 38 av_freep(&c->audio_elements);
187 38 c->nb_audio_elements = 0;
188
189
2/2
✓ Branch 0 taken 38 times.
✓ Branch 1 taken 38 times.
76 for (int i = 0; i < c->nb_mix_presentations; i++)
190 38 ff_iamf_free_mix_presentation(&c->mix_presentations[i]);
191 38 av_freep(&c->mix_presentations);
192 38 c->nb_mix_presentations = 0;
193
194
2/2
✓ Branch 0 taken 78 times.
✓ Branch 1 taken 38 times.
116 for (int i = 0; i < c->nb_param_definitions; i++)
195 78 av_free(c->param_definitions[i]);
196 38 av_freep(&c->param_definitions);
197 38 c->nb_param_definitions = 0;
198 }
199

假性近视是什么意思 白癜风什么症状 老打嗝是什么原因 孩子咳嗽吃什么药效果好 新生儿感冒是什么症状
手口足吃什么药 什么的浪花 老板娘是什么意思 头晕呕吐吃什么药 解表药是什么意思
狐假虎威告诉我们什么道理 虾跟什么不能一起吃 梦到抓鱼是什么意思 声带小结是什么意思 兔子不吃窝边草是什么意思
高血压什么症状表现 为什么总是睡不着 餐边柜放什么东西 虎落平阳被犬欺是什么生肖 什么是匝道图片
女生排卵期在什么时候hcv8jop9ns2r.cn 1997是什么年hcv9jop8ns0r.cn 一饿就胃疼是什么原因xinmaowt.com elsa是什么意思hcv7jop6ns1r.cn sdh是什么意思hcv8jop1ns1r.cn
市政协常委是什么级别hcv9jop3ns9r.cn 学生证件号码是什么dayuxmw.com 咆哮是什么意思hcv8jop2ns9r.cn 为什么会牙痛hcv8jop1ns4r.cn 腿麻木是什么原因引起的hcv9jop6ns7r.cn
头昏是什么原因hcv9jop1ns5r.cn 什么是西米hcv8jop7ns3r.cn 皮肤属于什么系统zhongyiyatai.com 补钙吃什么食物hcv7jop6ns1r.cn 月经前乳房胀痛是什么原因hcv8jop1ns5r.cn
毛囊炎的症状是什么原因引起的hcv9jop7ns0r.cn 做什么事要从头来hcv9jop5ns6r.cn 琼花是什么意思hcv7jop9ns6r.cn 肚脐眼左边疼是什么原因hcv8jop0ns1r.cn 印第安纹是什么hcv7jop5ns4r.cn
百度