Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
d721141f
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,发现更多精彩内容 >>
提交
d721141f
编写于
10月 16, 2010
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move shared functions out of CONFIG_FFV1_ENCODER ifdef
Originally committed as revision 25511 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
3f2a7e42
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
37 addition
and
37 deletion
+37
-37
libavcodec/ffv1.c
libavcodec/ffv1.c
+37
-37
未找到文件。
libavcodec/ffv1.c
浏览文件 @
d721141f
...
...
@@ -676,43 +676,6 @@ static av_cold int common_init(AVCodecContext *avctx){
return
0
;
}
#if CONFIG_FFV1_ENCODER
static
int
write_extra_header
(
FFV1Context
*
f
){
RangeCoder
*
const
c
=
&
f
->
c
;
uint8_t
state
[
CONTEXT_SIZE
];
int
i
;
memset
(
state
,
128
,
sizeof
(
state
));
f
->
avctx
->
extradata
=
av_malloc
(
f
->
avctx
->
extradata_size
=
10000
);
ff_init_range_encoder
(
c
,
f
->
avctx
->
extradata
,
f
->
avctx
->
extradata_size
);
ff_build_rac_states
(
c
,
0
.
05
*
(
1LL
<<
32
),
256
-
8
);
put_symbol
(
c
,
state
,
f
->
version
,
0
);
put_symbol
(
c
,
state
,
f
->
ac
,
0
);
if
(
f
->
ac
>
1
){
for
(
i
=
1
;
i
<
256
;
i
++
){
f
->
state_transition
[
i
]
=
ver2_state
[
i
];
put_symbol
(
c
,
state
,
ver2_state
[
i
]
-
c
->
one_state
[
i
],
1
);
}
}
put_symbol
(
c
,
state
,
f
->
colorspace
,
0
);
//YUV cs type
put_symbol
(
c
,
state
,
f
->
avctx
->
bits_per_raw_sample
,
0
);
put_rac
(
c
,
state
,
1
);
//chroma planes
put_symbol
(
c
,
state
,
f
->
chroma_h_shift
,
0
);
put_symbol
(
c
,
state
,
f
->
chroma_v_shift
,
0
);
put_rac
(
c
,
state
,
0
);
//no transparency plane
put_symbol
(
c
,
state
,
f
->
num_h_slices
-
1
,
0
);
put_symbol
(
c
,
state
,
f
->
num_v_slices
-
1
,
0
);
put_symbol
(
c
,
state
,
f
->
quant_table_count
,
0
);
for
(
i
=
0
;
i
<
f
->
quant_table_count
;
i
++
)
write_quant_tables
(
c
,
f
->
quant_tables
[
i
]);
f
->
avctx
->
extradata_size
=
ff_rac_terminate
(
c
);
return
0
;
}
static
int
init_slice_state
(
FFV1Context
*
f
){
int
i
,
j
;
...
...
@@ -772,6 +735,43 @@ static av_cold int init_slice_contexts(FFV1Context *f){
return
0
;
}
#if CONFIG_FFV1_ENCODER
static
int
write_extra_header
(
FFV1Context
*
f
){
RangeCoder
*
const
c
=
&
f
->
c
;
uint8_t
state
[
CONTEXT_SIZE
];
int
i
;
memset
(
state
,
128
,
sizeof
(
state
));
f
->
avctx
->
extradata
=
av_malloc
(
f
->
avctx
->
extradata_size
=
10000
);
ff_init_range_encoder
(
c
,
f
->
avctx
->
extradata
,
f
->
avctx
->
extradata_size
);
ff_build_rac_states
(
c
,
0
.
05
*
(
1LL
<<
32
),
256
-
8
);
put_symbol
(
c
,
state
,
f
->
version
,
0
);
put_symbol
(
c
,
state
,
f
->
ac
,
0
);
if
(
f
->
ac
>
1
){
for
(
i
=
1
;
i
<
256
;
i
++
){
f
->
state_transition
[
i
]
=
ver2_state
[
i
];
put_symbol
(
c
,
state
,
ver2_state
[
i
]
-
c
->
one_state
[
i
],
1
);
}
}
put_symbol
(
c
,
state
,
f
->
colorspace
,
0
);
//YUV cs type
put_symbol
(
c
,
state
,
f
->
avctx
->
bits_per_raw_sample
,
0
);
put_rac
(
c
,
state
,
1
);
//chroma planes
put_symbol
(
c
,
state
,
f
->
chroma_h_shift
,
0
);
put_symbol
(
c
,
state
,
f
->
chroma_v_shift
,
0
);
put_rac
(
c
,
state
,
0
);
//no transparency plane
put_symbol
(
c
,
state
,
f
->
num_h_slices
-
1
,
0
);
put_symbol
(
c
,
state
,
f
->
num_v_slices
-
1
,
0
);
put_symbol
(
c
,
state
,
f
->
quant_table_count
,
0
);
for
(
i
=
0
;
i
<
f
->
quant_table_count
;
i
++
)
write_quant_tables
(
c
,
f
->
quant_tables
[
i
]);
f
->
avctx
->
extradata_size
=
ff_rac_terminate
(
c
);
return
0
;
}
static
av_cold
int
encode_init
(
AVCodecContext
*
avctx
)
{
FFV1Context
*
s
=
avctx
->
priv_data
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录