Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
7a4eebcd
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7a4eebcd
编写于
7月 08, 2009
作者:
A
Alex Converse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Turn on AAC rate control.
Originally committed as revision 19379 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
c8f47d8b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
14 deletion
+6
-14
libavcodec/aaccoder.c
libavcodec/aaccoder.c
+5
-14
libavcodec/aacenc.c
libavcodec/aacenc.c
+1
-0
未找到文件。
libavcodec/aaccoder.c
浏览文件 @
7a4eebcd
...
...
@@ -457,15 +457,6 @@ static void encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce
}
}
static
void
encode_window_bands_info_fixed
(
AACEncContext
*
s
,
SingleChannelElement
*
sce
,
int
win
,
int
group_len
,
const
float
lambda
)
{
encode_window_bands_info
(
s
,
sce
,
win
,
group_len
,
1
.
0
f
);
}
typedef
struct
TrellisPath
{
float
cost
;
int
prev
;
...
...
@@ -700,7 +691,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
sce
->
ics
.
swb_sizes
[
g
],
sce
->
sf_idx
[
w
*
16
+
g
],
ESC_BT
,
1
.
0
,
lambda
,
INFINITY
,
&
b
);
bb
+=
b
;
...
...
@@ -710,7 +701,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
minbits
=
bb
;
}
}
dists
[
w
*
16
+
g
]
=
mindist
-
minbits
;
dists
[
w
*
16
+
g
]
=
(
mindist
-
minbits
)
/
lambda
;
bits
=
minbits
;
if
(
prev
!=
-
1
)
{
bits
+=
ff_aac_scalefactor_bits
[
sce
->
sf_idx
[
w
*
16
+
g
]
-
prev
+
SCALE_DIFF_ZERO
];
...
...
@@ -870,12 +861,12 @@ static void search_for_quantizers_faac(AVCodecContext *avctx, AACEncContext *s,
sce
->
ics
.
swb_sizes
[
g
],
scf
,
ESC_BT
,
1
.
0
,
lambda
,
INFINITY
,
&
b
);
dist
-=
b
;
}
dist
*=
1
.
0
f
/
512
.
0
f
;
dist
*=
1
.
0
f
/
512
.
0
f
/
lambda
;
quant_max
=
quant
(
maxq
[
w
*
16
+
g
],
ff_aac_pow2sf_tab
[
200
-
scf
+
SCALE_ONE_POS
-
SCALE_DIV_512
]);
if
(
quant_max
>=
8191
)
{
// too much, return to the previous quantizer
sce
->
sf_idx
[
w
*
16
+
g
]
=
prev_scf
;
...
...
@@ -1019,7 +1010,7 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
AACCoefficientsEncoder
ff_aac_coders
[]
=
{
{
search_for_quantizers_faac
,
encode_window_bands_info
_fixed
,
encode_window_bands_info
,
quantize_and_encode_band
,
// search_for_ms,
},
...
...
libavcodec/aacenc.c
浏览文件 @
7a4eebcd
...
...
@@ -583,6 +583,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
if
(
!
(
avctx
->
flags
&
CODEC_FLAG_QSCALE
))
{
float
ratio
=
avctx
->
bit_rate
*
1024
.
0
f
/
avctx
->
sample_rate
/
avctx
->
frame_bits
;
s
->
lambda
*=
ratio
;
s
->
lambda
=
fminf
(
s
->
lambda
,
65536
.
f
);
}
if
(
avctx
->
frame_bits
>
6144
*
avctx
->
channels
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录