涉嫌是什么意思| 合卺是什么意思| 猫咪拉肚子吃什么药| 固本培元是什么意思| 绿幽灵五行属什么| 传教士是什么意思| 南无是什么意思| 膂力是什么意思| 什么是平舌音| 高脂血症是什么意思| 直肠炎吃什么药最好| 鞘是什么意思| 谢娜人气为什么那么高| 杏不能和什么一起吃| 痛风吃什么食物好得快| 230是什么意思| 1月17日是什么星座| 扁桃体肿大是什么原因引起的| 淋巴挂什么科| 为什么会得牙周炎| 风湿病吃什么药| 帕金森是什么原因引起的| 什么样的人不能坐飞机| 一直不来月经是什么原因| mv是什么单位| 窝是什么结构的字| 胃反酸水是什么原因| 低血压适合吃什么食物| 左眼跳是什么原因| 东营有什么大学| 体温偏高的人说明什么| 拉肚子胃疼吃什么药| 血脂高是什么原因引起的| 小便有泡沫是什么情况| 京酱肉丝用什么酱| 胆小如鼠是什么生肖| 一什么大厦| 2001年是什么命| 医疗行业五行属什么| 北瓜是什么| 人中深的女人代表什么| 日进斗金什么意思| 什么叫双向情感障碍| 佝偻病是什么病| 医学美容技术学什么| 昙花一现是什么生肖| 一九七一年属什么生肖| prep是什么药| 窦性心律室性早搏是什么意思| 乌唇是什么原因| 生理性厌恶是什么意思| 表面抗原阳性是什么意思| 李连杰为什么不娶丁岚| 为什么会黄体破裂| 左手经常发麻是什么原因引起的| 小孩掉头发是什么原因引起的| 吃什么药可以延长性功能| 大连靠近什么海| 什么是指| 霉菌性阴道炎是什么引起的| 推手是什么意思| 梅核气西医叫什么| 一什么方法| 导师是什么意思| 刮宫和清宫有什么区别| 俄罗斯人是什么人种| 吃汉堡为什么要配可乐| 餐后胆囊是什么意思| 碘伏过敏是什么症状| 11月24是什么星座| 为什么拔牙后不能吐口水| 脂肪酸是什么| 做美甲有什么危害| 血钾高是什么引起的| 猫的舌头为什么有刺| 初心是什么意思| 米加白念什么| 低血压不能吃什么食物| 丝字五行属什么| 越位是什么意思| 玻璃五行属什么| 半夜是什么时辰| 菠萝什么季节成熟| 地球什么时候毁灭| 格力空调se是什么意思| 什么而什么见| 智齿什么时候拔最好| river是什么意思| 考试穿什么颜色最吉利| 嘴唇颜色深是什么原因| 尿潴留吃什么药| 梦见老虎是什么预兆| 蚕除了吃桑叶还能吃什么| 什么水果是钙中之王| 收缩压和舒张压是什么意思| 中暑是什么感觉| 吃榴莲对妇科病有什么好处| 九牛一毛指什么生肖| 黄色有什么黄| 朝对什么| 消防大队长是什么级别| 沙拉是什么| 西瓜有什么品种| 阴道口痒用什么药好| 凝固是什么意思| 什么人不能爬泰山| 亚急性甲状腺炎吃什么药| 上海新华医院擅长什么| 一什么石子| 朝鲜的货币叫什么| 强心剂是什么意思| 痔疮是什么样的| 西洋参不适合什么人吃| 低脂是什么意思| 三花鱼是什么鱼| EXP什么意思| 睡眠不好总做梦是什么原因| fl是胎儿的什么意思| 狗狗产后吃什么下奶多| 粘土能做什么| 为什么睡觉会打呼| 兵工厂属于什么单位| 猫贫血吃什么补血最快| 什么东西蛋白质含量高| 梦见手机屏幕摔碎了是什么意思| 孕酮低有什么症状| 网球肘用什么膏药效果好| 2030是什么年| 第一次是什么感觉| 排骨炖什么补血补气| 长脸适合什么眼镜框| 平安夜什么时候吃苹果| 支气管炎吃什么药最有效| 300年前是什么朝代| 乳头痛是什么征兆| 灰指甲是什么症状| 什么是肝脏纤维化| 一什么老虎| 中医师承是什么意思| 菠萝和凤梨有什么区别| 空调吹感冒吃什么药| 舌头有问题看什么科| 受凉拉肚子吃什么药| 人生得意须尽欢什么意思| 惋惜是什么意思| 感冒喉咙痛挂什么科| hbaic是什么意思| 酒糟鼻子是什么原因引起的| 梦见建房子是什么预兆| 翻过山越过海是什么歌| 什么减肥药最管用| 下面痒用什么清洗最好| 阿昔洛韦乳膏治什么| 梦见鳝鱼是什么预兆| 车辆购置税什么时候交| 犯罪是什么意思| 中年人吃什么钙片补钙效果好| 更年期综合征吃什么药| 用什么泡脚能减肥| 神经性呕吐是什么症状| 马桶为什么会堵| 寒湿化热吃什么中成药| 清朝前面是什么朝代| 斛什么意思| 口腔痛什么原因| 一个斤一个页念什么| 胃不好不能吃什么| 眉毛下方有痣代表什么| 肝病有什么征兆| 胃疼吃什么药最有效| 腋下长痘痘是什么原因| 已所不欲勿施于人是什么意思| 曹操的脸谱是什么颜色| 文化大革命是什么时候开始的| 张柏芝和谢霆锋为什么离婚| 尿里红细胞高什么原因| 大利月小利月什么意思| 玉如意什么属相不能戴| 什么啤酒好| 甲亢病有什么症状| 鸡拉白色稀粪吃什么药| 洗衣粉和洗衣液有什么区别| 白带褐色什么原因| 粘液丝是什么| 闰六月给父母买什么| jk制服是什么意思| 膀胱壁增厚毛糙是什么意思| 安络血又叫什么名| 尘字五行属什么| 海外是什么意思| 泮池是什么意思| 睿字五行属什么| 婴儿游泳有什么好处和坏处| 为什么会得子宫腺肌症| 奇点是什么| 什么水果含叶酸最多| 前列腺炎是什么症状| 浑浊是什么意思| 为什么会口臭的原因| 越睡越困是什么原因| 什么食物可以降血糖| 10000是什么电话| 为什么放屁特别臭| 烙馍卷菜搭配什么菜| 结核抗体弱阳性什么意思| 抗链o高是什么原因| 化疗期间吃什么| 缺血灶是什么意思| 木堂念什么| 外冷内热是什么症状| 瘪嘴是什么意思| 阿西吧是什么意思| 88岁属什么生肖| 美容美体是干什么的| 胃泌素瘤是什么意思| 车暴晒有什么影响| 葡萄糖属于什么糖| 普惠性幼儿园是什么意思| 所以然什么意思| 属猪五行属什么| 甲亢做什么检查| 云彩像什么| 1989年是什么年| 1972年是什么年| 正方形的纸能折什么| 尿道口有烧灼感为什么| 身上红痣多是什么原因| 2003年属羊是什么命| 丙肝是什么病严重吗| 尿变红色是什么原因| 高同型半胱氨酸血症吃什么药| 蜂蜜的主要成分是什么| 为什么不能摸猫的肚子| 小学什么时候期末考试| 钙盐沉积是什么意思| 玉仁玫白膏有什么功效| 女人手指粗短是什么命| 炫耀是什么意思| 低血压是什么原因引起的| 一个金字旁一个先读什么| 浓绿的什么| 胸外扩是什么样子| her是什么意思| 手发抖吃什么药| 肾炎康复片主要是治疗什么| 室缺是什么意思| 羊与什么相冲| 翡翠是什么意思| 火把节是什么节日| 鸟吃什么东西| 广菜是什么菜| 海参什么人不适合吃| 干贝和瑶柱有什么区别| 3月20日什么星座| 赭石色是什么颜色| 焦虑症吃什么药好得快| 梦见吃樱桃是什么意思| click什么意思| 低频是什么意思| 金克木是什么意思| 液氮是什么东西| 痛风吃什么水果好| 为什么会突发脑溢血| 女性肾虚吃什么补最好最快| 百度

“结石宝宝”父亲改判无罪:准备申请国家补偿


Directory: ../../../ffmpeg/
File: src/libavcodec/ac3dsp.c
Date: 2025-08-04 00:43:16
Exec Total Coverage
Lines: 209 218 95.9%
Functions: 17 17 100.0%
Branches: 84 102 82.4%

Line Branch Exec Source
1 /*
2 * AC-3 DSP functions
3 * Copyright (c) 2011 Justin Ruggles
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 <math.h>
23 #include <stdlib.h>
24 #include <string.h>
25
26 #include "config.h"
27 #include "libavutil/attributes.h"
28 #include "libavutil/common.h"
29 #include "libavutil/intmath.h"
30 #include "libavutil/mem_internal.h"
31
32 #include "ac3defs.h"
33 #include "ac3dsp.h"
34 #include "ac3tab.h"
35 #include "mathops.h"
36
37 3793 static void ac3_exponent_min_c(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
38 {
39 int blk, i;
40
41
2/2
✓ Branch 0 taken 737 times.
✓ Branch 1 taken 3056 times.
3793 if (!num_reuse_blocks)
42 737 return;
43
44
2/2
✓ Branch 0 taken 782336 times.
✓ Branch 1 taken 3056 times.
785392 for (i = 0; i < nb_coefs; i++) {
45 782336 uint8_t min_exp = *exp;
46 782336 uint8_t *exp1 = exp + 256;
47
2/2
✓ Branch 0 taken 3247616 times.
✓ Branch 1 taken 782336 times.
4029952 for (blk = 0; blk < num_reuse_blocks; blk++) {
48 3247616 uint8_t next_exp = *exp1;
49
2/2
✓ Branch 0 taken 515209 times.
✓ Branch 1 taken 2732407 times.
3247616 if (next_exp < min_exp)
50 515209 min_exp = next_exp;
51 3247616 exp1 += 256;
52 }
53 782336 *exp++ = min_exp;
54 }
55 }
56
57 3825 static void float_to_fixed24_c(int32_t *dst, const float *src, size_t len)
58 {
59 3825 const float scale = 1 << 24;
60 do {
61 327984 *dst++ = lrintf(*src++ * scale);
62 327984 *dst++ = lrintf(*src++ * scale);
63 327984 *dst++ = lrintf(*src++ * scale);
64 327984 *dst++ = lrintf(*src++ * scale);
65 327984 *dst++ = lrintf(*src++ * scale);
66 327984 *dst++ = lrintf(*src++ * scale);
67 327984 *dst++ = lrintf(*src++ * scale);
68 327984 *dst++ = lrintf(*src++ * scale);
69 327984 len -= 8;
70
2/2
✓ Branch 0 taken 324159 times.
✓ Branch 1 taken 3825 times.
327984 } while (len > 0);
71 3825 }
72
73 46069 static void ac3_bit_alloc_calc_bap_c(int16_t *mask, int16_t *psd,
74 int start, int end,
75 int snr_offset, int floor,
76 const uint8_t *bap_tab, uint8_t *bap)
77 {
78 int bin, band, band_end;
79
80 /* special case, if snr offset is -960, set all bap's to zero */
81
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 46069 times.
46069 if (snr_offset == -960) {
82 memset(bap, 0, AC3_MAX_COEFS);
83 return;
84 }
85
86 46069 bin = start;
87 46069 band = ff_ac3_bin_to_band_tab[start];
88 do {
89 1449733 int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
90 1449733 band_end = ff_ac3_band_start_tab[++band];
91 1449733 band_end = FFMIN(band_end, end);
92
93
2/2
✓ Branch 0 taken 5535001 times.
✓ Branch 1 taken 1449733 times.
6984734 for (; bin < band_end; bin++) {
94 5535001 int address = av_clip_uintp2((psd[bin] - m) >> 5, 6);
95 5535001 bap[bin] = bap_tab[address];
96 }
97
2/2
✓ Branch 0 taken 1403664 times.
✓ Branch 1 taken 46069 times.
1449733 } while (end > band_end);
98 }
99
100 138894 static void ac3_update_bap_counts_c(uint16_t mant_cnt[16], uint8_t *bap,
101 int len)
102 {
103
2/2
✓ Branch 0 taken 15841842 times.
✓ Branch 1 taken 138894 times.
15980736 while (len-- > 0)
104 15841842 mant_cnt[bap[len]]++;
105 138894 }
106
107 DECLARE_ALIGNED(16, const uint16_t, ff_ac3_bap_bits)[16] = {
108 0, 0, 0, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16
109 };
110
111 10649 static int ac3_compute_mantissa_size_c(uint16_t mant_cnt[6][16])
112 {
113 int blk, bap;
114 10649 int bits = 0;
115
116
2/2
✓ Branch 0 taken 63894 times.
✓ Branch 1 taken 10649 times.
74543 for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
117 // bap=1 : 3 mantissas in 5 bits
118 63894 bits += (mant_cnt[blk][1] / 3) * 5;
119 // bap=2 : 3 mantissas in 7 bits
120 // bap=4 : 2 mantissas in 7 bits
121 63894 bits += ((mant_cnt[blk][2] / 3) + (mant_cnt[blk][4] >> 1)) * 7;
122 // bap=3 : 1 mantissa in 3 bits
123 63894 bits += mant_cnt[blk][3] * 3;
124 // bap=5 to 15 : get bits per mantissa from table
125
2/2
✓ Branch 0 taken 702834 times.
✓ Branch 1 taken 63894 times.
766728 for (bap = 5; bap < 16; bap++)
126 702834 bits += mant_cnt[blk][bap] * ff_ac3_bap_bits[bap];
127 }
128 10649 return bits;
129 }
130
131 5645 static void ac3_extract_exponents_c(uint8_t *exp, int32_t *coef, int nb_coefs)
132 {
133 int i;
134
135
2/2
✓ Branch 0 taken 4403520 times.
✓ Branch 1 taken 5645 times.
4409165 for (i = 0; i < nb_coefs; i++) {
136 4403520 int v = abs(coef[i]);
137
2/2
✓ Branch 0 taken 3356237 times.
✓ Branch 1 taken 1047283 times.
4403520 exp[i] = v ? 23 - av_log2(v) : 24;
138 }
139 5645 }
140
141 4154 static void ac3_sum_square_butterfly_int32_c(int64_t sum[4],
142 const int32_t *coef0,
143 const int32_t *coef1,
144 int len)
145 {
146 int i;
147
148 4154 sum[0] = sum[1] = sum[2] = sum[3] = 0;
149
150
2/2
✓ Branch 0 taken 87672 times.
✓ Branch 1 taken 4154 times.
91826 for (i = 0; i < len; i++) {
151 87672 int lt = coef0[i];
152 87672 int rt = coef1[i];
153 87672 int md = lt + rt;
154 87672 int sd = lt - rt;
155 87672 MAC64(sum[0], lt, lt);
156 87672 MAC64(sum[1], rt, rt);
157 87672 MAC64(sum[2], md, md);
158 87672 MAC64(sum[3], sd, sd);
159 }
160 4154 }
161
162 13106 static void ac3_sum_square_butterfly_float_c(float sum[4],
163 const float *coef0,
164 const float *coef1,
165 int len)
166 {
167 int i;
168
169 13106 sum[0] = sum[1] = sum[2] = sum[3] = 0;
170
171
2/2
✓ Branch 0 taken 275664 times.
✓ Branch 1 taken 13106 times.
288770 for (i = 0; i < len; i++) {
172 275664 float lt = coef0[i];
173 275664 float rt = coef1[i];
174 275664 float md = lt + rt;
175 275664 float sd = lt - rt;
176 275664 sum[0] += lt * lt;
177 275664 sum[1] += rt * rt;
178 275664 sum[2] += md * md;
179 275664 sum[3] += sd * sd;
180 }
181 13106 }
182
183 342 static void ac3_downmix_5_to_2_symmetric_c(float **samples, float **matrix,
184 int len)
185 {
186 int i;
187 float v0, v1;
188 342 float front_mix = matrix[0][0];
189 342 float center_mix = matrix[0][1];
190 342 float surround_mix = matrix[0][3];
191
192
2/2
✓ Branch 0 taken 87552 times.
✓ Branch 1 taken 342 times.
87894 for (i = 0; i < len; i++) {
193 87552 v0 = samples[0][i] * front_mix +
194 87552 samples[1][i] * center_mix +
195 87552 samples[3][i] * surround_mix;
196
197 87552 v1 = samples[1][i] * center_mix +
198 87552 samples[2][i] * front_mix +
199 87552 samples[4][i] * surround_mix;
200
201 87552 samples[0][i] = v0;
202 87552 samples[1][i] = v1;
203 }
204 342 }
205
206 342 static void ac3_downmix_5_to_1_symmetric_c(float **samples, float **matrix,
207 int len)
208 {
209 int i;
210 342 float front_mix = matrix[0][0];
211 342 float center_mix = matrix[0][1];
212 342 float surround_mix = matrix[0][3];
213
214
2/2
✓ Branch 0 taken 87552 times.
✓ Branch 1 taken 342 times.
87894 for (i = 0; i < len; i++) {
215 87552 samples[0][i] = samples[0][i] * front_mix +
216 87552 samples[1][i] * center_mix +
217 87552 samples[2][i] * front_mix +
218 87552 samples[3][i] * surround_mix +
219 87552 samples[4][i] * surround_mix;
220 }
221 342 }
222
223 764 static void ac3_downmix_c(float **samples, float **matrix,
224 int out_ch, int in_ch, int len)
225 {
226 int i, j;
227 float v0, v1;
228
229
2/2
✓ Branch 0 taken 379 times.
✓ Branch 1 taken 385 times.
764 if (out_ch == 2) {
230
2/2
✓ Branch 0 taken 96896 times.
✓ Branch 1 taken 379 times.
97275 for (i = 0; i < len; i++) {
231 96896 v0 = v1 = 0.0f;
232
2/2
✓ Branch 0 taken 387584 times.
✓ Branch 1 taken 96896 times.
484480 for (j = 0; j < in_ch; j++) {
233 387584 v0 += samples[j][i] * matrix[0][j];
234 387584 v1 += samples[j][i] * matrix[1][j];
235 }
236 96896 samples[0][i] = v0;
237 96896 samples[1][i] = v1;
238 }
239
1/2
✓ Branch 0 taken 385 times.
✗ Branch 1 not taken.
385 } else if (out_ch == 1) {
240
2/2
✓ Branch 0 taken 98432 times.
✓ Branch 1 taken 385 times.
98817 for (i = 0; i < len; i++) {
241 98432 v0 = 0.0f;
242
2/2
✓ Branch 0 taken 393728 times.
✓ Branch 1 taken 98432 times.
492160 for (j = 0; j < in_ch; j++)
243 393728 v0 += samples[j][i] * matrix[0][j];
244 98432 samples[0][i] = v0;
245 }
246 }
247 764 }
248
249 330 static void ac3_downmix_5_to_2_symmetric_c_fixed(int32_t **samples, int16_t **matrix,
250 int len)
251 {
252 int i;
253 int64_t v0, v1;
254 330 int16_t front_mix = matrix[0][0];
255 330 int16_t center_mix = matrix[0][1];
256 330 int16_t surround_mix = matrix[0][3];
257
258
2/2
✓ Branch 0 taken 84480 times.
✓ Branch 1 taken 330 times.
84810 for (i = 0; i < len; i++) {
259 84480 v0 = (int64_t)samples[0][i] * front_mix +
260 84480 (int64_t)samples[1][i] * center_mix +
261 84480 (int64_t)samples[3][i] * surround_mix;
262
263 84480 v1 = (int64_t)samples[1][i] * center_mix +
264 84480 (int64_t)samples[2][i] * front_mix +
265 84480 (int64_t)samples[4][i] * surround_mix;
266
267 84480 samples[0][i] = (v0+2048)>>12;
268 84480 samples[1][i] = (v1+2048)>>12;
269 }
270 330 }
271
272 330 static void ac3_downmix_5_to_1_symmetric_c_fixed(int32_t **samples, int16_t **matrix,
273 int len)
274 {
275 int i;
276 int64_t v0;
277 330 int16_t front_mix = matrix[0][0];
278 330 int16_t center_mix = matrix[0][1];
279 330 int16_t surround_mix = matrix[0][3];
280
281
2/2
✓ Branch 0 taken 84480 times.
✓ Branch 1 taken 330 times.
84810 for (i = 0; i < len; i++) {
282 84480 v0 = (int64_t)samples[0][i] * front_mix +
283 84480 (int64_t)samples[1][i] * center_mix +
284 84480 (int64_t)samples[2][i] * front_mix +
285 84480 (int64_t)samples[3][i] * surround_mix +
286 84480 (int64_t)samples[4][i] * surround_mix;
287
288 84480 samples[0][i] = (v0+2048)>>12;
289 }
290 330 }
291
292 372 static void ac3_downmix_c_fixed(int32_t **samples, int16_t **matrix,
293 int out_ch, int in_ch, int len)
294 {
295 int i, j;
296 int64_t v0, v1;
297
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 372 times.
372 if (out_ch == 2) {
298 for (i = 0; i < len; i++) {
299 v0 = v1 = 0;
300 for (j = 0; j < in_ch; j++) {
301 v0 += (int64_t)samples[j][i] * matrix[0][j];
302 v1 += (int64_t)samples[j][i] * matrix[1][j];
303 }
304 samples[0][i] = (v0+2048)>>12;
305 samples[1][i] = (v1+2048)>>12;
306 }
307
1/2
✓ Branch 0 taken 372 times.
✗ Branch 1 not taken.
372 } else if (out_ch == 1) {
308
2/2
✓ Branch 0 taken 95104 times.
✓ Branch 1 taken 372 times.
95476 for (i = 0; i < len; i++) {
309 95104 v0 = 0;
310
2/2
✓ Branch 0 taken 380416 times.
✓ Branch 1 taken 95104 times.
475520 for (j = 0; j < in_ch; j++)
311 380416 v0 += (int64_t)samples[j][i] * matrix[0][j];
312 95104 samples[0][i] = (v0+2048)>>12;
313 }
314 }
315 372 }
316
317 1032 void ff_ac3dsp_downmix_fixed(AC3DSPContext *c, int32_t **samples, int16_t **matrix,
318 int out_ch, int in_ch, int len)
319 {
320
3/4
✓ Branch 0 taken 1029 times.
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1029 times.
1032 if (c->in_channels != in_ch || c->out_channels != out_ch) {
321 3 c->in_channels = in_ch;
322 3 c->out_channels = out_ch;
323 3 c->downmix_fixed = NULL;
324
325
4/4
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
3 if (in_ch == 5 && out_ch == 2 &&
326 1 !(matrix[1][0] | matrix[0][2] |
327 1 matrix[1][3] | matrix[0][4] |
328 1 (matrix[0][1] ^ matrix[1][1]) |
329
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 (matrix[0][0] ^ matrix[1][2]))) {
330 1 c->downmix_fixed = ac3_downmix_5_to_2_symmetric_c_fixed;
331
3/4
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
2 } else if (in_ch == 5 && out_ch == 1 &&
332
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 matrix[0][0] == matrix[0][2] &&
333
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 matrix[0][3] == matrix[0][4]) {
334 1 c->downmix_fixed = ac3_downmix_5_to_1_symmetric_c_fixed;
335 }
336 }
337
338
2/2
✓ Branch 0 taken 660 times.
✓ Branch 1 taken 372 times.
1032 if (c->downmix_fixed)
339 660 c->downmix_fixed(samples, matrix, len);
340 else
341 372 ac3_downmix_c_fixed(samples, matrix, out_ch, in_ch, len);
342 1032 }
343
344 1448 void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
345 int out_ch, int in_ch, int len)
346 {
347
3/4
✓ Branch 0 taken 1437 times.
✓ Branch 1 taken 11 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1437 times.
1448 if (c->in_channels != in_ch || c->out_channels != out_ch) {
348 11 int **matrix_cmp = (int **)matrix;
349
350 11 c->in_channels = in_ch;
351 11 c->out_channels = out_ch;
352 11 c->downmix = NULL;
353
354
4/4
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 3 times.
11 if (in_ch == 5 && out_ch == 2 &&
355 3 !(matrix_cmp[1][0] | matrix_cmp[0][2] |
356 3 matrix_cmp[1][3] | matrix_cmp[0][4] |
357 3 (matrix_cmp[0][1] ^ matrix_cmp[1][1]) |
358
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 (matrix_cmp[0][0] ^ matrix_cmp[1][2]))) {
359 3 c->downmix = ac3_downmix_5_to_2_symmetric_c;
360
3/4
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 3 times.
✗ Branch 3 not taken.
8 } else if (in_ch == 5 && out_ch == 1 &&
361
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 matrix_cmp[0][0] == matrix_cmp[0][2] &&
362
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 matrix_cmp[0][3] == matrix_cmp[0][4]) {
363 3 c->downmix = ac3_downmix_5_to_1_symmetric_c;
364 }
365
366 #if ARCH_X86
367 11 ff_ac3dsp_set_downmix_x86(c);
368 #endif
369 }
370
371
2/2
✓ Branch 0 taken 684 times.
✓ Branch 1 taken 764 times.
1448 if (c->downmix)
372 684 c->downmix(samples, matrix, len);
373 else
374 764 ac3_downmix_c(samples, matrix, out_ch, in_ch, len);
375 1448 }
376
377 125 av_cold void ff_ac3dsp_init(AC3DSPContext *c)
378 {
379 125 c->ac3_exponent_min = ac3_exponent_min_c;
380 125 c->float_to_fixed24 = float_to_fixed24_c;
381 125 c->bit_alloc_calc_bap = ac3_bit_alloc_calc_bap_c;
382 125 c->update_bap_counts = ac3_update_bap_counts_c;
383 125 c->compute_mantissa_size = ac3_compute_mantissa_size_c;
384 125 c->extract_exponents = ac3_extract_exponents_c;
385 125 c->sum_square_butterfly_int32 = ac3_sum_square_butterfly_int32_c;
386 125 c->sum_square_butterfly_float = ac3_sum_square_butterfly_float_c;
387 125 c->in_channels = 0;
388 125 c->out_channels = 0;
389 125 c->downmix = NULL;
390 125 c->downmix_fixed = NULL;
391
392 #if ARCH_AARCH64
393 ff_ac3dsp_init_aarch64(c);
394 #elif ARCH_ARM
395 ff_ac3dsp_init_arm(c);
396 #elif ARCH_X86
397 125 ff_ac3dsp_init_x86(c);
398 #elif ARCH_MIPS
399 ff_ac3dsp_init_mips(c);
400 #elif ARCH_RISCV
401 ff_ac3dsp_init_riscv(c);
402 #endif
403 125 }
404

不丹为什么不跟中国建交 加盟资质需要什么条件 梦见洗头是什么预兆 甜蜜素是什么东西 画面感是什么意思
什么时候打仗 软组织损伤是什么意思 早晨起床口苦是什么原因 睡眠不好用什么泡脚 拉稀吃什么
去拉萨需要准备什么 香奈儿属于什么档次 早泄吃什么好 胃出血吃什么药 鸟屎掉头上有什么预兆
今天什么生肖 去医院检查怀孕挂什么科 女性肾火旺有什么症状 万象更新是什么意思 金先读什么
勃起是什么意思hcv8jop3ns9r.cn 早上打喷嚏是什么预兆hcv8jop6ns6r.cn 六块钱的麻辣烫是什么意思hcv9jop7ns2r.cn gly是什么氨基酸hcv8jop8ns1r.cn ecology是什么意思hcv7jop9ns2r.cn
六个口是什么字hcv9jop1ns7r.cn 财主代表什么生肖luyiluode.com 脑白质病是什么病hcv9jop0ns8r.cn 早上7点到9点是什么时辰hcv7jop6ns4r.cn 毛囊炎用什么洗发水hcv8jop9ns1r.cn
葡萄糖氯化钠注射作用是什么xianpinbao.com 一血是什么意思hcv9jop5ns2r.cn 思源名字的寓意是什么hcv8jop1ns0r.cn 紫外线过敏用什么药膏hcv9jop7ns3r.cn 公丁香和母丁香有什么区别beikeqingting.com
用什么能把牙齿洗白hcv8jop2ns2r.cn 平板运动试验阳性是什么意思helloaicloud.com 曼珠沙华是什么意思liaochangning.com 碳酸钙俗称什么hcv7jop6ns1r.cn 开什么店最赚钱hcv9jop6ns4r.cn
百度