Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
066fff75
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,发现更多精彩内容 >>
提交
066fff75
编写于
9月 21, 2011
作者:
L
Laurent Aimar
提交者:
Janne Grunau
10月 07, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vp6: Check for huffman tree build errors
Signed-off-by:
N
Janne Grunau
<
janne-libav@jannau.net
>
上级
0ec6d6e9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
11 deletion
+18
-11
libavcodec/vp5.c
libavcodec/vp5.c
+2
-1
libavcodec/vp56.c
libavcodec/vp56.c
+3
-1
libavcodec/vp56.h
libavcodec/vp56.h
+1
-1
libavcodec/vp6.c
libavcodec/vp6.c
+12
-8
未找到文件。
libavcodec/vp5.c
浏览文件 @
066fff75
...
...
@@ -118,7 +118,7 @@ static void vp5_parse_vector_models(VP56Context *s)
model
->
vector_pdv
[
comp
][
node
]
=
vp56_rac_gets_nn
(
c
,
7
);
}
static
void
vp5_parse_coeff_models
(
VP56Context
*
s
)
static
int
vp5_parse_coeff_models
(
VP56Context
*
s
)
{
VP56RangeCoder
*
c
=
&
s
->
c
;
VP56Model
*
model
=
s
->
modelp
;
...
...
@@ -162,6 +162,7 @@ static void vp5_parse_coeff_models(VP56Context *s)
for
(
ctx
=
0
;
ctx
<
6
;
ctx
++
)
for
(
node
=
0
;
node
<
5
;
node
++
)
model
->
coeff_acct
[
pt
][
ct
][
cg
][
ctx
][
node
]
=
av_clip
(((
model
->
coeff_ract
[
pt
][
ct
][
cg
][
node
]
*
vp5_ract_lc
[
ct
][
cg
][
node
][
ctx
][
0
]
+
128
)
>>
8
)
+
vp5_ract_lc
[
ct
][
cg
][
node
][
ctx
][
1
],
1
,
254
);
return
0
;
}
static
void
vp5_parse_coeff
(
VP56Context
*
s
)
...
...
libavcodec/vp56.c
浏览文件 @
066fff75
...
...
@@ -541,7 +541,8 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
s
->
mb_type
=
VP56_MB_INTER_NOVEC_PF
;
}
s
->
parse_coeff_models
(
s
);
if
(
s
->
parse_coeff_models
(
s
))
goto
next
;
memset
(
s
->
prev_dc
,
0
,
sizeof
(
s
->
prev_dc
));
s
->
prev_dc
[
1
][
VP56_FRAME_CURRENT
]
=
128
;
...
...
@@ -605,6 +606,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
}
next:
if
(
p
->
key_frame
||
golden_frame
)
{
if
(
s
->
framep
[
VP56_FRAME_GOLDEN
]
->
data
[
0
]
&&
s
->
framep
[
VP56_FRAME_GOLDEN
]
!=
s
->
framep
[
VP56_FRAME_GOLDEN2
])
...
...
libavcodec/vp56.h
浏览文件 @
066fff75
...
...
@@ -48,7 +48,7 @@ typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src,
typedef
void
(
*
VP56ParseCoeff
)(
VP56Context
*
s
);
typedef
void
(
*
VP56DefaultModelsInit
)(
VP56Context
*
s
);
typedef
void
(
*
VP56ParseVectorModels
)(
VP56Context
*
s
);
typedef
void
(
*
VP56ParseCoeffModels
)(
VP56Context
*
s
);
typedef
int
(
*
VP56ParseCoeffModels
)(
VP56Context
*
s
);
typedef
int
(
*
VP56ParseHeader
)(
VP56Context
*
s
,
const
uint8_t
*
buf
,
int
buf_size
,
int
*
golden_frame
);
...
...
libavcodec/vp6.c
浏览文件 @
066fff75
...
...
@@ -236,7 +236,7 @@ static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
FF_HUFFMAN_FLAG_HNODE_FIRST
);
}
static
void
vp6_parse_coeff_models
(
VP56Context
*
s
)
static
int
vp6_parse_coeff_models
(
VP56Context
*
s
)
{
VP56RangeCoder
*
c
=
&
s
->
c
;
VP56Model
*
model
=
s
->
modelp
;
...
...
@@ -281,15 +281,18 @@ static void vp6_parse_coeff_models(VP56Context *s)
if
(
s
->
use_huffman
)
{
for
(
pt
=
0
;
pt
<
2
;
pt
++
)
{
vp6_build_huff_tree
(
s
,
model
->
coeff_dccv
[
pt
],
vp6_huff_coeff_map
,
12
,
&
s
->
dccv_vlc
[
pt
]);
vp6_build_huff_tree
(
s
,
model
->
coeff_runv
[
pt
],
vp6_huff_run_map
,
9
,
&
s
->
runv_vlc
[
pt
]);
if
(
vp6_build_huff_tree
(
s
,
model
->
coeff_dccv
[
pt
],
vp6_huff_coeff_map
,
12
,
&
s
->
dccv_vlc
[
pt
]))
return
-
1
;
if
(
vp6_build_huff_tree
(
s
,
model
->
coeff_runv
[
pt
],
vp6_huff_run_map
,
9
,
&
s
->
runv_vlc
[
pt
]))
return
-
1
;
for
(
ct
=
0
;
ct
<
3
;
ct
++
)
for
(
cg
=
0
;
cg
<
6
;
cg
++
)
vp6_build_huff_tree
(
s
,
model
->
coeff_ract
[
pt
][
ct
][
cg
],
vp6_huff_coeff_map
,
12
,
&
s
->
ract_vlc
[
pt
][
ct
][
cg
]);
if
(
vp6_build_huff_tree
(
s
,
model
->
coeff_ract
[
pt
][
ct
][
cg
],
vp6_huff_coeff_map
,
12
,
&
s
->
ract_vlc
[
pt
][
ct
][
cg
]))
return
-
1
;
}
memset
(
s
->
nb_null
,
0
,
sizeof
(
s
->
nb_null
));
}
else
{
...
...
@@ -299,6 +302,7 @@ static void vp6_parse_coeff_models(VP56Context *s)
for
(
node
=
0
;
node
<
5
;
node
++
)
model
->
coeff_dcct
[
pt
][
ctx
][
node
]
=
av_clip
(((
model
->
coeff_dccv
[
pt
][
node
]
*
vp6_dccv_lc
[
ctx
][
node
][
0
]
+
128
)
>>
8
)
+
vp6_dccv_lc
[
ctx
][
node
][
1
],
1
,
255
);
}
return
0
;
}
static
void
vp6_parse_vector_adjustment
(
VP56Context
*
s
,
VP56mv
*
vect
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录