Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
B1ack1e
FFmpeg
提交
99214d42
F
FFmpeg
项目概览
B1ack1e
/
FFmpeg
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FFmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
99214d42
编写于
2月 08, 2016
作者:
L
Luca Barbato
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dnxhd: Make the encoder message friendlier
上级
34c9eba9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
2 deletion
+27
-2
libavcodec/dnxhddata.c
libavcodec/dnxhddata.c
+23
-0
libavcodec/dnxhddata.h
libavcodec/dnxhddata.h
+1
-0
libavcodec/dnxhdenc.c
libavcodec/dnxhdenc.c
+3
-2
未找到文件。
libavcodec/dnxhddata.c
浏览文件 @
99214d42
...
@@ -1203,3 +1203,26 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
...
@@ -1203,3 +1203,26 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
}
}
return
0
;
return
0
;
}
}
void
ff_dnxhd_list_cid
(
AVCodecContext
*
avctx
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
ff_dnxhd_cid_table
);
i
++
)
{
const
CIDEntry
*
cid
=
&
ff_dnxhd_cid_table
[
i
];
av_log
(
avctx
,
AV_LOG_INFO
,
"cid %d %ux%u %dbits %s bit rates"
,
cid
->
cid
,
cid
->
width
,
cid
->
height
,
cid
->
bit_depth
,
cid
->
interlaced
?
"interlaced "
:
"progressive"
);
for
(
j
=
0
;
j
<
FF_ARRAY_ELEMS
(
cid
->
bit_rates
);
j
++
)
{
if
(
!
cid
->
bit_rates
[
j
])
break
;
av_log
(
avctx
,
AV_LOG_INFO
,
" %dM"
,
cid
->
bit_rates
[
j
]);
}
av_log
(
avctx
,
AV_LOG_INFO
,
"
\n
"
);
}
}
libavcodec/dnxhddata.h
浏览文件 @
99214d42
...
@@ -47,5 +47,6 @@ extern const CIDEntry ff_dnxhd_cid_table[];
...
@@ -47,5 +47,6 @@ extern const CIDEntry ff_dnxhd_cid_table[];
int
ff_dnxhd_get_cid_table
(
int
cid
);
int
ff_dnxhd_get_cid_table
(
int
cid
);
int
ff_dnxhd_find_cid
(
AVCodecContext
*
avctx
,
int
bit_depth
);
int
ff_dnxhd_find_cid
(
AVCodecContext
*
avctx
,
int
bit_depth
);
void
ff_dnxhd_list_cid
(
AVCodecContext
*
avctx
);
#endif
/* AVCODEC_DNXHDDATA_H */
#endif
/* AVCODEC_DNXHDDATA_H */
libavcodec/dnxhdenc.c
浏览文件 @
99214d42
...
@@ -289,14 +289,15 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
...
@@ -289,14 +289,15 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"
pixel format is incompatible with DNxHD
\n
"
);
"
Pixel format is incompatible with DNxHD, use yuv422p or yuv422p10.
\n
"
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
ctx
->
cid
=
ff_dnxhd_find_cid
(
avctx
,
bit_depth
);
ctx
->
cid
=
ff_dnxhd_find_cid
(
avctx
,
bit_depth
);
if
(
!
ctx
->
cid
)
{
if
(
!
ctx
->
cid
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"video parameters incompatible with DNxHD
\n
"
);
"Video parameters incompatible with DNxHD, available CIDs:
\n
"
);
ff_dnxhd_list_cid
(
avctx
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
av_log
(
avctx
,
AV_LOG_DEBUG
,
"cid %d
\n
"
,
ctx
->
cid
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"cid %d
\n
"
,
ctx
->
cid
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录