Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
云duo
FFmpeg
提交
26ffcc7d
F
FFmpeg
项目概览
云duo
/
FFmpeg
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FFmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
26ffcc7d
编写于
7月 16, 2013
作者:
B
Ben Avison
提交者:
Martin Storsjö
7月 22, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dcadec: Use int32_to_float_fmul_array8
Signed-off-by:
N
Martin Storsjö
<
martin@martin.st
>
上级
31c6f6f6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
8 deletion
+15
-8
libavcodec/dcadec.c
libavcodec/dcadec.c
+15
-8
未找到文件。
libavcodec/dcadec.c
浏览文件 @
26ffcc7d
...
...
@@ -1140,7 +1140,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
/* FIXME */
float
(
*
subband_samples
)[
DCA_SUBBANDS
][
8
]
=
s
->
subband_samples
[
block_index
];
LOCAL_ALIGNED_16
(
int32_t
,
block
,
[
8
]);
LOCAL_ALIGNED_16
(
int32_t
,
block
,
[
8
*
DCA_SUBBANDS
]);
/*
* Audio data
...
...
@@ -1153,6 +1153,8 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
quant_step_table
=
lossy_quant_d
;
for
(
k
=
base_channel
;
k
<
s
->
prim_channels
;
k
++
)
{
float
rscale
[
DCA_SUBBANDS
];
if
(
get_bits_left
(
&
s
->
gb
)
<
0
)
return
AVERROR_INVALIDDATA
;
...
...
@@ -1175,11 +1177,12 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
* Extract bits from the bit stream
*/
if
(
!
abits
)
{
memset
(
subband_samples
[
k
][
l
],
0
,
8
*
sizeof
(
subband_samples
[
0
][
0
][
0
]));
rscale
[
l
]
=
0
;
memset
(
block
+
8
*
l
,
0
,
8
*
sizeof
(
block
[
0
]));
}
else
{
/* Deal with transients */
int
sfi
=
s
->
transition_mode
[
k
][
l
]
&&
subsubframe
>=
s
->
transition_mode
[
k
][
l
];
float
rscale
=
quant_step_size
*
s
->
scale_factor
[
k
][
l
][
sfi
]
*
rscale
[
l
]
=
quant_step_size
*
s
->
scale_factor
[
k
][
l
][
sfi
]
*
s
->
scalefactor_adj
[
k
][
sel
];
if
(
abits
>=
11
||
!
dca_smpl_bitalloc
[
abits
].
vlc
[
sel
].
table
)
{
...
...
@@ -1193,7 +1196,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
block_code1
=
get_bits
(
&
s
->
gb
,
size
);
block_code2
=
get_bits
(
&
s
->
gb
,
size
);
err
=
decode_blockcodes
(
block_code1
,
block_code2
,
levels
,
block
);
levels
,
block
+
8
*
l
);
if
(
err
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"ERROR: block code look-up failed
\n
"
);
...
...
@@ -1202,19 +1205,23 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
}
else
{
/* no coding */
for
(
m
=
0
;
m
<
8
;
m
++
)
block
[
m
]
=
get_sbits
(
&
s
->
gb
,
abits
-
3
);
block
[
8
*
l
+
m
]
=
get_sbits
(
&
s
->
gb
,
abits
-
3
);
}
}
else
{
/* Huffman coded */
for
(
m
=
0
;
m
<
8
;
m
++
)
block
[
m
]
=
get_bitalloc
(
&
s
->
gb
,
block
[
8
*
l
+
m
]
=
get_bitalloc
(
&
s
->
gb
,
&
dca_smpl_bitalloc
[
abits
],
sel
);
}
s
->
fmt_conv
.
int32_to_float_fmul_scalar
(
subband_samples
[
k
][
l
],
block
,
rscale
,
8
);
}
}
s
->
fmt_conv
.
int32_to_float_fmul_array8
(
&
s
->
fmt_conv
,
subband_samples
[
k
][
0
],
block
,
rscale
,
8
*
s
->
vq_start_subband
[
k
]);
for
(
l
=
0
;
l
<
s
->
vq_start_subband
[
k
];
l
++
)
{
int
m
;
/*
* Inverse ADPCM if in prediction mode
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录