Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
f72f8a77
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,发现更多精彩内容 >>
提交
f72f8a77
编写于
7月 19, 2006
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
simplification
Originally committed as revision 5794 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
09eb00f6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
114 deletion
+21
-114
libavcodec/vp3.c
libavcodec/vp3.c
+21
-114
未找到文件。
libavcodec/vp3.c
浏览文件 @
f72f8a77
...
...
@@ -1367,19 +1367,6 @@ static void reverse_dc_prediction(Vp3DecodeContext *s,
int
x
,
y
;
int
i
=
first_fragment
;
/*
* Fragment prediction groups:
*
* 32222222226
* 10000000004
* 10000000004
* 10000000004
* 10000000004
*
* Note: Groups 5 and 7 do not exist as it would mean that the
* fragment's x coordinate is both 0 and (width - 1) at the same time.
*/
int
predictor_group
;
short
predicted_dc
;
/* validity flags for the left, up-left, up, and up-right fragments */
...
...
@@ -1458,113 +1445,33 @@ static void reverse_dc_prediction(Vp3DecodeContext *s,
current_frame_type
=
compatible_frame
[
s
->
all_fragments
[
i
].
coding_method
];
predictor_group
=
(
x
==
0
)
+
((
y
==
0
)
<<
1
)
+
((
x
+
1
==
fragment_width
)
<<
2
);
debug_dc_pred
(
" frag %d: group %d, orig DC = %d, "
,
i
,
predictor_group
,
DC_COEFF
(
i
));
switch
(
predictor_group
)
{
case
0
:
/* main body of fragments; consider all 4 possible
* fragments for prediction */
/* calculate the indices of the predicting fragments */
ul
=
i
-
fragment_width
-
1
;
u
=
i
-
fragment_width
;
ur
=
i
-
fragment_width
+
1
;
l
=
i
-
1
;
/* fetch the DC values for the predicting fragments */
vul
=
DC_COEFF
(
ul
);
vu
=
DC_COEFF
(
u
);
vur
=
DC_COEFF
(
ur
);
vl
=
DC_COEFF
(
l
);
/* figure out which fragments are valid */
ful
=
FRAME_CODED
(
ul
)
&&
COMPATIBLE_FRAME
(
ul
);
fu
=
FRAME_CODED
(
u
)
&&
COMPATIBLE_FRAME
(
u
);
fur
=
FRAME_CODED
(
ur
)
&&
COMPATIBLE_FRAME
(
ur
);
fl
=
FRAME_CODED
(
l
)
&&
COMPATIBLE_FRAME
(
l
);
/* decide which predictor transform to use */
transform
=
(
fl
*
PL
)
|
(
fu
*
PU
)
|
(
ful
*
PUL
)
|
(
fur
*
PUR
);
break
;
case
1
:
/* left column of fragments, not including top corner;
* only consider up and up-right fragments */
/* calculate the indices of the predicting fragments */
u
=
i
-
fragment_width
;
ur
=
i
-
fragment_width
+
1
;
/* fetch the DC values for the predicting fragments */
vu
=
DC_COEFF
(
u
);
vur
=
DC_COEFF
(
ur
);
/* figure out which fragments are valid */
fur
=
FRAME_CODED
(
ur
)
&&
COMPATIBLE_FRAME
(
ur
);
fu
=
FRAME_CODED
(
u
)
&&
COMPATIBLE_FRAME
(
u
);
/* decide which predictor transform to use */
transform
=
(
fu
*
PU
)
|
(
fur
*
PUR
);
break
;
i
,
-
1
,
DC_COEFF
(
i
));
case
2
:
case
6
:
/* top row of fragments, not including top-left frag;
* only consider the left fragment for prediction */
/* calculate the indices of the predicting fragments */
l
=
i
-
1
;
/* fetch the DC values for the predicting fragments */
transform
=
0
;
if
(
x
){
l
=
i
-
1
;
vl
=
DC_COEFF
(
l
);
/* figure out which fragments are valid */
fl
=
FRAME_CODED
(
l
)
&&
COMPATIBLE_FRAME
(
l
);
/* decide which predictor transform to use */
transform
=
(
fl
*
PL
);
break
;
case
3
:
/* top-left fragment */
/* nothing to predict from in this case */
transform
=
0
;
break
;
case
4
:
/* right column of fragments, not including top corner;
* consider up-left, up, and left fragments for
* prediction */
/* calculate the indices of the predicting fragments */
ul
=
i
-
fragment_width
-
1
;
u
=
i
-
fragment_width
;
l
=
i
-
1
;
/* fetch the DC values for the predicting fragments */
vul
=
DC_COEFF
(
ul
);
transform
|=
fl
*
PL
;
}
if
(
y
){
u
=
i
-
fragment_width
;
vu
=
DC_COEFF
(
u
);
vl
=
DC_COEFF
(
l
);
/* figure out which fragments are valid */
ful
=
FRAME_CODED
(
ul
)
&&
COMPATIBLE_FRAME
(
ul
);
fu
=
FRAME_CODED
(
u
)
&&
COMPATIBLE_FRAME
(
u
);
fl
=
FRAME_CODED
(
l
)
&&
COMPATIBLE_FRAME
(
l
);
/* decide which predictor transform to use */
transform
=
(
fl
*
PL
)
|
(
fu
*
PU
)
|
(
ful
*
PUL
);
break
;
transform
|=
fu
*
PU
;
if
(
x
){
ul
=
i
-
fragment_width
-
1
;
vul
=
DC_COEFF
(
ul
);
ful
=
FRAME_CODED
(
ul
)
&&
COMPATIBLE_FRAME
(
ul
);
transform
|=
ful
*
PUL
;
}
if
(
x
+
1
<
fragment_width
){
ur
=
i
-
fragment_width
+
1
;
vur
=
DC_COEFF
(
ur
);
fur
=
FRAME_CODED
(
ur
)
&&
COMPATIBLE_FRAME
(
ur
);
transform
|=
fur
*
PUR
;
}
}
debug_dc_pred
(
"transform = %d, "
,
transform
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录