Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
0b8e7ab0
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,发现更多精彩内容 >>
提交
0b8e7ab0
编写于
9月 28, 2009
作者:
D
Diego Biurrun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some more linebreak and brace placement cosmetics
Originally committed as revision 20071 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
5e56b30e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
16 deletion
+29
-16
libavcodec/vorbis.c
libavcodec/vorbis.c
+24
-12
libavcodec/vorbis_dec.c
libavcodec/vorbis_dec.c
+3
-3
libavcodec/vorbis_enc.c
libavcodec/vorbis_enc.c
+2
-1
未找到文件。
libavcodec/vorbis.c
浏览文件 @
0b8e7ab0
...
...
@@ -39,7 +39,8 @@ unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n)
do
{
++
ret
;
for
(
i
=
0
,
j
=
ret
;
i
<
n
-
1
;
i
++
)
j
*=
ret
;
for
(
i
=
0
,
j
=
ret
;
i
<
n
-
1
;
i
++
)
j
*=
ret
;
}
while
(
j
<=
x
);
return
ret
-
1
;
...
...
@@ -62,14 +63,16 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, uint_fast32_t num)
GetBitContext
gb
;
#endif
for
(
p
=
0
;(
bits
[
p
]
==
0
)
&&
(
p
<
num
);
++
p
);
for
(
p
=
0
;(
bits
[
p
]
==
0
)
&&
(
p
<
num
);
++
p
)
;
if
(
p
==
num
)
{
// av_log(vc->avccontext, AV_LOG_INFO, "An empty codebook. Heh?! \n");
return
0
;
}
codes
[
p
]
=
0
;
if
(
bits
[
p
]
>
32
)
return
1
;
if
(
bits
[
p
]
>
32
)
return
1
;
for
(
i
=
0
;
i
<
bits
[
p
];
++
i
)
exit_at_level
[
i
+
1
]
=
1
<<
i
;
...
...
@@ -84,12 +87,16 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, uint_fast32_t num)
++
p
;
for
(;
p
<
num
;
++
p
)
{
if
(
bits
[
p
]
>
32
)
return
1
;
if
(
bits
[
p
]
==
0
)
continue
;
if
(
bits
[
p
]
>
32
)
return
1
;
if
(
bits
[
p
]
==
0
)
continue
;
// find corresponding exit(node which the tree can grow further from)
for
(
i
=
bits
[
p
];
i
>
0
;
--
i
)
if
(
exit_at_level
[
i
])
break
;
if
(
!
i
)
return
1
;
// overspecified tree
if
(
exit_at_level
[
i
])
break
;
if
(
!
i
)
// overspecified tree
return
1
;
code
=
exit_at_level
[
i
];
exit_at_level
[
i
]
=
0
;
// construct code (append 0s to end) and introduce new exits
...
...
@@ -109,7 +116,8 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, uint_fast32_t num)
//no exits should be left (underspecified tree - ie. unused valid vlcs - not allowed by SPEC)
for
(
p
=
1
;
p
<
33
;
p
++
)
if
(
exit_at_level
[
p
])
return
1
;
if
(
exit_at_level
[
p
])
return
1
;
return
0
;
}
...
...
@@ -127,9 +135,11 @@ void ff_vorbis_ready_floor1_list(vorbis_floor1_entry * list, int values)
for
(
j
=
2
;
j
<
i
;
j
++
)
{
int
tmp
=
list
[
j
].
x
;
if
(
tmp
<
list
[
i
].
x
)
{
if
(
tmp
>
list
[
list
[
i
].
low
].
x
)
list
[
i
].
low
=
j
;
if
(
tmp
>
list
[
list
[
i
].
low
].
x
)
list
[
i
].
low
=
j
;
}
else
{
if
(
tmp
<
list
[
list
[
i
].
high
].
x
)
list
[
i
].
high
=
j
;
if
(
tmp
<
list
[
list
[
i
].
high
].
x
)
list
[
i
].
high
=
j
;
}
}
}
...
...
@@ -212,7 +222,9 @@ void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
lx
=
x1
;
ly
=
y1
;
}
if
(
lx
>=
samples
)
break
;
if
(
lx
>=
samples
)
break
;
}
if
(
lx
<
samples
)
render_line
(
lx
,
ly
,
samples
,
ly
,
out
);
if
(
lx
<
samples
)
render_line
(
lx
,
ly
,
samples
,
ly
,
out
);
}
libavcodec/vorbis_dec.c
浏览文件 @
0b8e7ab0
...
...
@@ -747,9 +747,8 @@ static int vorbis_parse_setup_hdr_mappings(vorbis_context *vc)
if
(
mapping_setup
->
submaps
>
1
)
{
mapping_setup
->
mux
=
av_mallocz
(
vc
->
audio_channels
*
sizeof
(
uint_fast8_t
));
for
(
j
=
0
;
j
<
vc
->
audio_channels
;
++
j
)
{
for
(
j
=
0
;
j
<
vc
->
audio_channels
;
++
j
)
mapping_setup
->
mux
[
j
]
=
get_bits
(
gb
,
4
);
}
}
for
(
j
=
0
;
j
<
mapping_setup
->
submaps
;
++
j
)
{
...
...
@@ -1162,7 +1161,8 @@ static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc,
int_fast16_t
dy
,
err
;
if
(
!
get_bits1
(
gb
))
return
1
;
// silence
if
(
!
get_bits1
(
gb
))
// silence
return
1
;
// Read values (or differences) for the floor's points
...
...
libavcodec/vorbis_enc.c
浏览文件 @
0b8e7ab0
...
...
@@ -894,7 +894,8 @@ static int apply_window_and_mdct(vorbis_enc_context * venc,
float
n
=
(
float
)(
1
<<
venc
->
log2_blocksize
[
0
])
/
4
.;
// FIXME use dsp
if
(
!
venc
->
have_saved
&&
!
samples
)
return
0
;
if
(
!
venc
->
have_saved
&&
!
samples
)
return
0
;
if
(
venc
->
have_saved
)
for
(
channel
=
0
;
channel
<
venc
->
channels
;
channel
++
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录