Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
959472d6
提交
959472d6
authored
3月 12, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sigh
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7883
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
2e741e0f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
44 行增加
和
35 行删除
+44
-35
Makefile
src/mod/formats/mod_shout/Makefile
+1
-1
layer3.c
src/mod/formats/mod_shout/layer3.c
+43
-34
没有找到文件。
src/mod/formats/mod_shout/Makefile
浏览文件 @
959472d6
...
...
@@ -40,7 +40,7 @@ $(SHOUT_DIR):
$(GETLIB)
$(SHOUT)
.tar.gz
$(SHOUT_DIR)/Makefile
:
$(SHOUT_DIR)
cd
$(SHOUT_DIR)
&&
./configure
$(DEFAULT_ARGS)
--with-speex
=
no
cd
$(SHOUT_DIR)
&&
./configure
$(DEFAULT_ARGS)
--with-speex
=
no
--without-vorbis
$(TOUCH_TARGET)
$(SHOUTLA)
:
$(SHOUT_DIR)/Makefile
...
...
src/mod/formats/mod_shout/layer3.c
浏览文件 @
959472d6
...
...
@@ -14,7 +14,7 @@
#define MPEG1
/* These should all be constants setup once using init_layer3_const */
static
real
ispow
[
8207
];
static
real
__
ispow
[
8207
];
static
real
aa_ca
[
8
],
aa_cs
[
8
];
static
real
COS1
[
12
][
6
];
static
real
win
[
4
][
36
];
...
...
@@ -33,6 +33,14 @@ struct bandInfoStruct {
};
static
inline
real
find_pow
(
int
i
)
{
return
(
i
>
0
&&
i
<
8207
)
?
__ispow
[
i
]
:
1
;
}
struct
bandInfoStruct
bandInfo
[
9
]
=
{
/* MPEG 1.0 */
...
...
@@ -104,7 +112,7 @@ void init_layer3_const(void)
gainpow2
[
i
+
256
]
=
pow
((
double
)
2
.
0
,
-
0
.
25
*
(
double
)
(
i
+
210
));
for
(
i
=
0
;
i
<
8207
;
i
++
)
ispow
[
i
]
=
pow
((
double
)
i
,
(
double
)
4
.
0
/
3
.
0
);
__
ispow
[
i
]
=
pow
((
double
)
i
,
(
double
)
4
.
0
/
3
.
0
);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
static
double
Ci
[
8
]
=
{
-
0
.
6
,
-
0
.
535
,
-
0
.
33
,
-
0
.
185
,
-
0
.
095
,
-
0
.
041
,
-
0
.
0142
,
-
0
.
0037
};
...
...
@@ -681,20 +689,21 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
x
=
y
>>
4
;
y
&=
0xf
;
}
if
(
x
==
15
)
{
max
[
lwin
]
=
cb
;
part2remain
-=
h
->
linbits
+
1
;
x
+=
getbits
(
mp
,
h
->
linbits
);
if
(
get1bit
(
mp
))
*
xrpnt
=
-
ispow
[
x
]
*
v
;
*
xrpnt
=
find_pow
(
x
)
*
-
1
*
v
;
else
*
xrpnt
=
ispow
[
x
]
*
v
;
*
xrpnt
=
find_pow
(
x
)
*
v
;
}
else
if
(
x
)
{
max
[
lwin
]
=
cb
;
if
(
get1bit
(
mp
))
*
xrpnt
=
-
ispow
[
x
]
*
v
;
*
xrpnt
=
find_pow
(
x
)
*
-
1
*
v
;
else
*
xrpnt
=
ispow
[
x
]
*
v
;
*
xrpnt
=
find_pow
(
x
)
*
v
;
part2remain
--
;
}
else
*
xrpnt
=
0
.
0
;
...
...
@@ -704,15 +713,15 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
part2remain
-=
h
->
linbits
+
1
;
y
+=
getbits
(
mp
,
h
->
linbits
);
if
(
get1bit
(
mp
))
*
xrpnt
=
-
ispow
[
y
]
*
v
;
*
xrpnt
=
find_pow
(
y
)
*
-
1
*
v
;
else
*
xrpnt
=
ispow
[
y
]
*
v
;
*
xrpnt
=
find_pow
(
y
)
*
v
;
}
else
if
(
y
)
{
max
[
lwin
]
=
cb
;
if
(
get1bit
(
mp
))
*
xrpnt
=
-
ispow
[
y
]
*
v
;
*
xrpnt
=
find_pow
(
y
)
*
-
1
*
v
;
else
*
xrpnt
=
ispow
[
y
]
*
v
;
*
xrpnt
=
find_pow
(
y
)
*
v
;
part2remain
--
;
}
else
*
xrpnt
=
0
.
0
;
...
...
@@ -859,15 +868,15 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
part2remain
-=
h
->
linbits
+
1
;
x
+=
getbits
(
mp
,
h
->
linbits
);
if
(
get1bit
(
mp
))
*
xrpnt
++
=
-
ispow
[
x
]
*
v
;
*
xrpnt
++
=
find_pow
(
x
)
*
-
1
*
v
;
else
*
xrpnt
++
=
ispow
[
x
]
*
v
;
*
xrpnt
++
=
find_pow
(
x
)
*
v
;
}
else
if
(
x
)
{
max
=
cb
;
if
(
get1bit
(
mp
))
*
xrpnt
++
=
-
ispow
[
x
]
*
v
;
*
xrpnt
++
=
find_pow
(
x
)
*
-
1
*
v
;
else
*
xrpnt
++
=
ispow
[
x
]
*
v
;
*
xrpnt
++
=
find_pow
(
x
)
*
v
;
part2remain
--
;
}
else
*
xrpnt
++
=
0
.
0
;
...
...
@@ -877,15 +886,15 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
part2remain
-=
h
->
linbits
+
1
;
y
+=
getbits
(
mp
,
h
->
linbits
);
if
(
get1bit
(
mp
))
*
xrpnt
++
=
-
ispow
[
y
]
*
v
;
*
xrpnt
++
=
find_pow
(
y
)
*
-
1
*
v
;
else
*
xrpnt
++
=
ispow
[
y
]
*
v
;
*
xrpnt
++
=
find_pow
(
y
)
*
v
;
}
else
if
(
y
)
{
max
=
cb
;
if
(
get1bit
(
mp
))
*
xrpnt
++
=
-
ispow
[
y
]
*
v
;
*
xrpnt
++
=
find_pow
(
y
)
*
-
1
*
v
;
else
*
xrpnt
++
=
ispow
[
y
]
*
v
;
*
xrpnt
++
=
find_pow
(
y
)
*
v
;
part2remain
--
;
}
else
*
xrpnt
++
=
0
.
0
;
...
...
@@ -1049,22 +1058,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
part2remain -= h->linbits + 1;
x += getbits(mp, h->linbits);
if (get1bit(mp)) {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt = *xr0pnt + a;
*xr0pnt -= a;
} else {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt = *xr0pnt - a;
*xr0pnt += a;
}
} else if (x) {
max[lwin] = cb;
if (get1bit(mp)) {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt = *xr0pnt + a;
*xr0pnt -= a;
} else {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt = *xr0pnt - a;
*xr0pnt += a;
}
...
...
@@ -1079,22 +1088,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
part2remain -= h->linbits + 1;
y += getbits(mp, h->linbits);
if (get1bit(mp)) {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt = *xr0pnt + a;
*xr0pnt -= a;
} else {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt = *xr0pnt - a;
*xr0pnt += a;
}
} else if (y) {
max[lwin] = cb;
if (get1bit(mp)) {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt = *xr0pnt + a;
*xr0pnt -= a;
} else {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt = *xr0pnt - a;
*xr0pnt += a;
}
...
...
@@ -1231,22 +1240,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
part2remain -= h->linbits + 1;
x += getbits(mp, h->linbits);
if (get1bit(mp)) {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt++ = *xr0pnt + a;
*xr0pnt++ -= a;
} else {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt++ = *xr0pnt - a;
*xr0pnt++ += a;
}
} else if (x) {
max = cb;
if (get1bit(mp)) {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt++ = *xr0pnt + a;
*xr0pnt++ -= a;
} else {
real a =
ispow[x]
* v;
real a =
find_pow(x)
* v;
*xrpnt++ = *xr0pnt - a;
*xr0pnt++ += a;
}
...
...
@@ -1259,22 +1268,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
part2remain -= h->linbits + 1;
y += getbits(mp, h->linbits);
if (get1bit(mp)) {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt++ = *xr0pnt + a;
*xr0pnt++ -= a;
} else {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt++ = *xr0pnt - a;
*xr0pnt++ += a;
}
} else if (y) {
max = cb;
if (get1bit(mp)) {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt++ = *xr0pnt + a;
*xr0pnt++ -= a;
} else {
real a =
ispow[y]
* v;
real a =
find_pow(y)
* v;
*xrpnt++ = *xr0pnt - a;
*xr0pnt++ += a;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论