Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
d97efd7f
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,发现更多精彩内容 >>
提交
d97efd7f
编写于
10月 05, 2011
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libx264: support 9- and 10-bit output.
上级
4418aa9c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
2 deletion
+37
-2
libavcodec/avcodec.h
libavcodec/avcodec.h
+5
-0
libavcodec/libx264.c
libavcodec/libx264.c
+28
-1
libavcodec/utils.c
libavcodec/utils.c
+3
-0
libavcodec/version.h
libavcodec/version.h
+1
-1
未找到文件。
libavcodec/avcodec.h
浏览文件 @
d97efd7f
...
...
@@ -2984,6 +2984,11 @@ typedef struct AVCodec {
* Private codec-specific defaults.
*/
const
AVCodecDefault
*
defaults
;
/**
* Initialize codec static data, called from avcodec_register().
*/
void
(
*
init_static_data
)(
struct
AVCodec
*
codec
);
}
AVCodec
;
/**
...
...
libavcodec/libx264.c
浏览文件 @
d97efd7f
...
...
@@ -20,6 +20,7 @@
*/
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "internal.h"
#include <x264.h>
...
...
@@ -123,6 +124,8 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
x264_picture_init
(
&
x4
->
pic
);
x4
->
pic
.
img
.
i_csp
=
X264_CSP_I420
;
if
(
x264_bit_depth
>
8
)
x4
->
pic
.
img
.
i_csp
|=
X264_CSP_HIGH_DEPTH
;
x4
->
pic
.
img
.
i_plane
=
3
;
if
(
frame
)
{
...
...
@@ -456,6 +459,30 @@ static av_cold int X264_init(AVCodecContext *avctx)
return
0
;
}
static
const
enum
PixelFormat
pix_fmts_8bit
[]
=
{
PIX_FMT_YUV420P
,
PIX_FMT_YUVJ420P
,
PIX_FMT_NONE
};
static
const
enum
PixelFormat
pix_fmts_9bit
[]
=
{
PIX_FMT_YUV420P9
,
PIX_FMT_NONE
};
static
const
enum
PixelFormat
pix_fmts_10bit
[]
=
{
PIX_FMT_YUV420P10
,
PIX_FMT_NONE
};
static
av_cold
void
X264_init_static
(
AVCodec
*
codec
)
{
if
(
x264_bit_depth
==
8
)
codec
->
pix_fmts
=
pix_fmts_8bit
;
else
if
(
x264_bit_depth
==
9
)
codec
->
pix_fmts
=
pix_fmts_9bit
;
else
if
(
x264_bit_depth
==
10
)
codec
->
pix_fmts
=
pix_fmts_10bit
;
}
#define OFFSET(x) offsetof(X264Context, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static
const
AVOption
options
[]
=
{
...
...
@@ -544,8 +571,8 @@ AVCodec ff_libx264_encoder = {
.
encode
=
X264_frame
,
.
close
=
X264_close
,
.
capabilities
=
CODEC_CAP_DELAY
,
.
pix_fmts
=
(
const
enum
PixelFormat
[])
{
PIX_FMT_YUV420P
,
PIX_FMT_YUVJ420P
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"
),
.
priv_class
=
&
class
,
.
defaults
=
x264_defaults
,
.
init_static_data
=
X264_init_static
,
};
libavcodec/utils.c
浏览文件 @
d97efd7f
...
...
@@ -107,6 +107,9 @@ void avcodec_register(AVCodec *codec)
while
(
*
p
!=
NULL
)
p
=
&
(
*
p
)
->
next
;
*
p
=
codec
;
codec
->
next
=
NULL
;
if
(
codec
->
init_static_data
)
codec
->
init_static_data
(
codec
);
}
unsigned
avcodec_get_edge_width
(
void
)
...
...
libavcodec/version.h
浏览文件 @
d97efd7f
...
...
@@ -22,7 +22,7 @@
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 12
#define LIBAVCODEC_VERSION_MICRO
0
#define LIBAVCODEC_VERSION_MICRO
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录