Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
c172913a
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,发现更多精彩内容 >>
提交
c172913a
编写于
5月 02, 2004
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup
Originally committed as revision 3103 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
da7f8893
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
26 deletion
+19
-26
libavcodec/ffv1.c
libavcodec/ffv1.c
+19
-26
未找到文件。
libavcodec/ffv1.c
浏览文件 @
c172913a
...
...
@@ -375,8 +375,8 @@ static inline void encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], i
for
(
x
=
0
;
x
<
w
;
x
++
){
int
diff
,
context
;
context
=
get_context
(
s
,
sample
[
1
]
+
x
,
sample
[
0
]
+
x
,
sample
[
2
]
+
x
);
diff
=
sample
[
1
][
x
]
-
predict
(
sample
[
1
]
+
x
,
sample
[
0
]
+
x
);
context
=
get_context
(
s
,
sample
[
0
]
+
x
,
sample
[
1
]
+
x
,
sample
[
2
]
+
x
);
diff
=
sample
[
0
][
x
]
-
predict
(
sample
[
0
]
+
x
,
sample
[
1
]
+
x
);
if
(
context
<
0
){
context
=
-
context
;
...
...
@@ -429,25 +429,22 @@ static inline void encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], i
}
static
void
encode_plane
(
FFV1Context
*
s
,
uint8_t
*
src
,
int
w
,
int
h
,
int
stride
,
int
plane_index
){
int
x
,
y
;
int_fast16_t
sample_buffer
[
3
][
w
+
6
]
;
int_fast16_t
*
sample
[
3
]
=
{
sample_buffer
[
0
]
+
3
,
sample_buffer
[
1
]
+
3
,
sample_buffer
[
2
]
+
3
}
;
int
x
,
y
,
i
;
const
int
ring_size
=
2
;
int_fast16_t
sample_buffer
[
ring_size
][
w
+
6
],
*
sample
[
ring_size
]
;
s
->
run_index
=
0
;
memset
(
sample_buffer
,
0
,
sizeof
(
sample_buffer
));
for
(
y
=
0
;
y
<
h
;
y
++
){
int_fast16_t
*
temp
=
sample
[
0
];
//FIXME try a normal buffer
sample
[
0
]
=
sample
[
1
];
sample
[
1
]
=
sample
[
2
];
sample
[
2
]
=
temp
;
for
(
i
=
0
;
i
<
ring_size
;
i
++
)
sample
[
i
]
=
sample_buffer
[(
h
+
i
-
y
)
%
ring_size
]
+
3
;
sample
[
1
][
-
1
]
=
sample
[
0
][
0
];
sample
[
0
][
w
]
=
sample
[
0
][
w
-
1
];
sample
[
0
][
-
1
]
=
sample
[
1
][
0
];
sample
[
1
][
w
]
=
sample
[
1
][
w
-
1
];
//{START_TIMER
for
(
x
=
0
;
x
<
w
;
x
++
){
sample
[
1
][
x
]
=
src
[
x
+
stride
*
y
];
sample
[
0
][
x
]
=
src
[
x
+
stride
*
y
];
}
encode_line
(
s
,
w
,
sample
,
plane_index
,
8
);
//STOP_TIMER("encode line")}
...
...
@@ -455,17 +452,18 @@ static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride,
}
static
void
encode_rgb_frame
(
FFV1Context
*
s
,
uint32_t
*
src
,
int
w
,
int
h
,
int
stride
){
int
x
,
y
,
p
;
int_fast16_t
sample_buffer
[
3
][
2
][
w
+
6
];
int_fast16_t
*
sample
[
3
][
2
]
=
{
{
sample_buffer
[
0
][
0
]
+
3
,
sample_buffer
[
0
][
1
]
+
3
},
{
sample_buffer
[
1
][
0
]
+
3
,
sample_buffer
[
1
][
1
]
+
3
},
{
sample_buffer
[
2
][
0
]
+
3
,
sample_buffer
[
2
][
1
]
+
3
}};
int
x
,
y
,
p
,
i
;
const
int
ring_size
=
2
;
int_fast16_t
sample_buffer
[
3
][
ring_size
][
w
+
6
],
*
sample
[
3
][
ring_size
];
s
->
run_index
=
0
;
memset
(
sample_buffer
,
0
,
sizeof
(
sample_buffer
));
for
(
y
=
0
;
y
<
h
;
y
++
){
for
(
i
=
0
;
i
<
ring_size
;
i
++
)
for
(
p
=
0
;
p
<
3
;
p
++
)
sample
[
p
][
i
]
=
sample_buffer
[
p
][(
h
+
i
-
y
)
%
ring_size
]
+
3
;
for
(
x
=
0
;
x
<
w
;
x
++
){
int
v
=
src
[
x
+
stride
*
y
];
int
b
=
v
&
0xFF
;
...
...
@@ -485,13 +483,8 @@ static void encode_rgb_frame(FFV1Context *s, uint32_t *src, int w, int h, int st
sample
[
2
][
0
][
x
]
=
r
;
}
for
(
p
=
0
;
p
<
3
;
p
++
){
int_fast16_t
*
temp
=
sample
[
p
][
0
];
//FIXME try a normal buffer
sample
[
p
][
0
]
=
sample
[
p
][
1
];
sample
[
p
][
1
]
=
temp
;
sample
[
p
][
1
][
-
1
]
=
sample
[
p
][
0
][
0
];
sample
[
p
][
0
][
w
]
=
sample
[
p
][
0
][
w
-
1
];
sample
[
p
][
0
][
-
1
]
=
sample
[
p
][
1
][
0
];
sample
[
p
][
1
][
w
]
=
sample
[
p
][
1
][
w
-
1
];
encode_line
(
s
,
w
,
sample
[
p
],
FFMIN
(
p
,
1
),
9
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录