Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
11a32d53
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,发现更多精彩内容 >>
提交
11a32d53
编写于
6月 26, 2011
作者:
B
Baptiste Coudurier
提交者:
Alex Converse
10月 10, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dnxhddec: handle cid change in bitstream.
上级
109d8aa1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
5 deletion
+11
-5
libavcodec/dnxhddec.c
libavcodec/dnxhddec.c
+11
-5
未找到文件。
libavcodec/dnxhddec.c
浏览文件 @
11a32d53
...
...
@@ -70,7 +70,7 @@ static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
static
int
dnxhd_init_vlc
(
DNXHDContext
*
ctx
,
int
cid
)
{
if
(
!
ctx
->
cid_table
)
{
if
(
cid
!=
ctx
->
cid
)
{
int
index
;
if
((
index
=
ff_dnxhd_get_cid_table
(
cid
))
<
0
)
{
...
...
@@ -78,6 +78,11 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid)
return
-
1
;
}
ctx
->
cid_table
=
&
ff_dnxhd_cid_table
[
index
];
free_vlc
(
&
ctx
->
ac_vlc
);
free_vlc
(
&
ctx
->
dc_vlc
);
free_vlc
(
&
ctx
->
run_vlc
);
init_vlc
(
&
ctx
->
ac_vlc
,
DNXHD_VLC_BITS
,
257
,
ctx
->
cid_table
->
ac_bits
,
1
,
1
,
ctx
->
cid_table
->
ac_codes
,
2
,
2
,
0
);
...
...
@@ -89,6 +94,7 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid)
ctx
->
cid_table
->
run_codes
,
2
,
2
,
0
);
ff_init_scantable
(
ctx
->
dsp
.
idct_permutation
,
&
ctx
->
scantable
,
ff_zigzag_direct
);
ctx
->
cid
=
cid
;
}
return
0
;
}
...
...
@@ -96,7 +102,7 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid)
static
int
dnxhd_decode_header
(
DNXHDContext
*
ctx
,
const
uint8_t
*
buf
,
int
buf_size
,
int
first_field
)
{
static
const
uint8_t
header_prefix
[]
=
{
0x00
,
0x00
,
0x02
,
0x80
,
0x01
};
int
i
;
int
i
,
cid
;
if
(
buf_size
<
0x280
)
return
-
1
;
...
...
@@ -135,10 +141,10 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
}
}
c
tx
->
c
id
=
AV_RB32
(
buf
+
0x28
);
av_dlog
(
ctx
->
avctx
,
"compression id %d
\n
"
,
c
tx
->
c
id
);
cid
=
AV_RB32
(
buf
+
0x28
);
av_dlog
(
ctx
->
avctx
,
"compression id %d
\n
"
,
cid
);
if
(
dnxhd_init_vlc
(
ctx
,
c
tx
->
c
id
)
<
0
)
if
(
dnxhd_init_vlc
(
ctx
,
cid
)
<
0
)
return
-
1
;
if
(
buf_size
<
ctx
->
cid_table
->
coding_unit_size
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录