Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
8889cc4f
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,发现更多精彩内容 >>
提交
8889cc4f
编写于
11月 12, 2011
作者:
J
Justin Ruggles
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libavutil: add planar sample formats and av_sample_fmt_is_planar()
上级
aa38cff2
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
37 addition
and
6 deletion
+37
-6
doc/APIchanges
doc/APIchanges
+3
-0
libavutil/avutil.h
libavutil/avutil.h
+1
-1
libavutil/samplefmt.c
libavutil/samplefmt.c
+18
-5
libavutil/samplefmt.h
libavutil/samplefmt.h
+15
-0
未找到文件。
doc/APIchanges
浏览文件 @
8889cc4f
...
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-xx-xx - xxxxxxx - lavu 51.17.0
Add planar sample formats and av_sample_fmt_is_planar() to samplefmt.h.
2011-xx-xx - xxxxxxx - lavc 53.21.0
Move some AVCodecContext fields to a new private struct, AVCodecInternal,
which is accessed from a new field, AVCodecContext.internal.
...
...
libavutil/avutil.h
浏览文件 @
8889cc4f
...
...
@@ -153,7 +153,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 1
6
#define LIBAVUTIL_VERSION_MINOR 1
7
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
libavutil/samplefmt.c
浏览文件 @
8889cc4f
...
...
@@ -25,15 +25,21 @@
typedef
struct
SampleFmtInfo
{
const
char
*
name
;
int
bits
;
int
planar
;
}
SampleFmtInfo
;
/** this table gives more information about formats */
static
const
SampleFmtInfo
sample_fmt_info
[
AV_SAMPLE_FMT_NB
]
=
{
[
AV_SAMPLE_FMT_U8
]
=
{
.
name
=
"u8"
,
.
bits
=
8
},
[
AV_SAMPLE_FMT_S16
]
=
{
.
name
=
"s16"
,
.
bits
=
16
},
[
AV_SAMPLE_FMT_S32
]
=
{
.
name
=
"s32"
,
.
bits
=
32
},
[
AV_SAMPLE_FMT_FLT
]
=
{
.
name
=
"flt"
,
.
bits
=
32
},
[
AV_SAMPLE_FMT_DBL
]
=
{
.
name
=
"dbl"
,
.
bits
=
64
},
[
AV_SAMPLE_FMT_U8
]
=
{
.
name
=
"u8"
,
.
bits
=
8
,
.
planar
=
0
},
[
AV_SAMPLE_FMT_S16
]
=
{
.
name
=
"s16"
,
.
bits
=
16
,
.
planar
=
0
},
[
AV_SAMPLE_FMT_S32
]
=
{
.
name
=
"s32"
,
.
bits
=
32
,
.
planar
=
0
},
[
AV_SAMPLE_FMT_FLT
]
=
{
.
name
=
"flt"
,
.
bits
=
32
,
.
planar
=
0
},
[
AV_SAMPLE_FMT_DBL
]
=
{
.
name
=
"dbl"
,
.
bits
=
64
,
.
planar
=
0
},
[
AV_SAMPLE_FMT_U8P
]
=
{
.
name
=
"u8p"
,
.
bits
=
8
,
.
planar
=
1
},
[
AV_SAMPLE_FMT_S16P
]
=
{
.
name
=
"s16p"
,
.
bits
=
16
,
.
planar
=
1
},
[
AV_SAMPLE_FMT_S32P
]
=
{
.
name
=
"s32p"
,
.
bits
=
32
,
.
planar
=
1
},
[
AV_SAMPLE_FMT_FLTP
]
=
{
.
name
=
"fltp"
,
.
bits
=
32
,
.
planar
=
1
},
[
AV_SAMPLE_FMT_DBLP
]
=
{
.
name
=
"dblp"
,
.
bits
=
64
,
.
planar
=
1
},
};
const
char
*
av_get_sample_fmt_name
(
enum
AVSampleFormat
sample_fmt
)
...
...
@@ -79,3 +85,10 @@ int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt)
0
:
sample_fmt_info
[
sample_fmt
].
bits
;
}
#endif
int
av_sample_fmt_is_planar
(
enum
AVSampleFormat
sample_fmt
)
{
if
(
sample_fmt
<
0
||
sample_fmt
>=
AV_SAMPLE_FMT_NB
)
return
0
;
return
sample_fmt_info
[
sample_fmt
].
planar
;
}
libavutil/samplefmt.h
浏览文件 @
8889cc4f
...
...
@@ -31,6 +31,13 @@ enum AVSampleFormat {
AV_SAMPLE_FMT_S32
,
///< signed 32 bits
AV_SAMPLE_FMT_FLT
,
///< float
AV_SAMPLE_FMT_DBL
,
///< double
AV_SAMPLE_FMT_U8P
,
///< unsigned 8 bits, planar
AV_SAMPLE_FMT_S16P
,
///< signed 16 bits, planar
AV_SAMPLE_FMT_S32P
,
///< signed 32 bits, planar
AV_SAMPLE_FMT_FLTP
,
///< float, planar
AV_SAMPLE_FMT_DBLP
,
///< double, planar
AV_SAMPLE_FMT_NB
///< Number of sample formats. DO NOT USE if linking dynamically
};
...
...
@@ -77,4 +84,12 @@ int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt);
*/
int
av_get_bytes_per_sample
(
enum
AVSampleFormat
sample_fmt
);
/**
* Check if the sample format is planar.
*
* @param sample_fmt the sample format to inspect
* @return 1 if the sample format is planar, 0 if it is interleaved
*/
int
av_sample_fmt_is_planar
(
enum
AVSampleFormat
sample_fmt
);
#endif
/* AVUTIL_SAMPLEFMT_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录