Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
84d7933e
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,发现更多精彩内容 >>
提交
84d7933e
编写于
2月 19, 2016
作者:
C
Carl Eugen Hoyos
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavc/libvpx: Fix high-bitdepth pix_fmts on big endian.
上级
76af0c78
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
31 addition
and
31 deletion
+31
-31
libavcodec/libvpx.c
libavcodec/libvpx.c
+8
-8
libavcodec/libvpxdec.c
libavcodec/libvpxdec.c
+10
-10
libavcodec/libvpxenc.c
libavcodec/libvpxenc.c
+12
-12
libavcodec/version.h
libavcodec/version.h
+1
-1
未找到文件。
libavcodec/libvpx.c
浏览文件 @
84d7933e
...
...
@@ -46,14 +46,14 @@ static const enum AVPixelFormat vp9_pix_fmts_highbd[] = {
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUV440P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUV420P10
LE
,
AV_PIX_FMT_YUV422P10
LE
,
AV_PIX_FMT_YUV440P10
LE
,
AV_PIX_FMT_YUV444P10
LE
,
AV_PIX_FMT_YUV420P12
LE
,
AV_PIX_FMT_YUV422P12
LE
,
AV_PIX_FMT_YUV440P12
LE
,
AV_PIX_FMT_YUV444P12
LE
,
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV422P10
,
AV_PIX_FMT_YUV440P10
,
AV_PIX_FMT_YUV444P10
,
AV_PIX_FMT_YUV420P12
,
AV_PIX_FMT_YUV422P12
,
AV_PIX_FMT_YUV440P12
,
AV_PIX_FMT_YUV444P12
,
AV_PIX_FMT_NONE
};
#endif
...
...
libavcodec/libvpxdec.c
浏览文件 @
84d7933e
...
...
@@ -108,10 +108,10 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
case
VPX_IMG_FMT_I42016
:
avctx
->
profile
=
FF_PROFILE_VP9_2
;
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P10
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P10
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P12
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P12
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
...
...
@@ -119,10 +119,10 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
case
VPX_IMG_FMT_I42216
:
avctx
->
profile
=
FF_PROFILE_VP9_3
;
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P10
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P10
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P12
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P12
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
...
...
@@ -131,10 +131,10 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
case
VPX_IMG_FMT_I44016
:
avctx
->
profile
=
FF_PROFILE_VP9_3
;
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV440P10
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV440P10
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV440P12
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV440P12
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
...
...
@@ -145,17 +145,17 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img)
if
(
img
->
bit_depth
==
10
)
{
#if VPX_IMAGE_ABI_VERSION >= 3
avctx
->
pix_fmt
=
avctx
->
colorspace
==
AVCOL_SPC_RGB
?
AV_PIX_FMT_GBRP10
LE
:
AV_PIX_FMT_YUV444P10LE
;
AV_PIX_FMT_GBRP10
:
AV_PIX_FMT_YUV444P10
;
#else
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P10
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P10
;
#endif
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
#if VPX_IMAGE_ABI_VERSION >= 3
avctx
->
pix_fmt
=
avctx
->
colorspace
==
AVCOL_SPC_RGB
?
AV_PIX_FMT_GBRP12
LE
:
AV_PIX_FMT_YUV444P12LE
;
AV_PIX_FMT_GBRP12
:
AV_PIX_FMT_YUV444P12
;
#else
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P12
LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P12
;
#endif
return
0
;
}
else
{
...
...
libavcodec/libvpxenc.c
浏览文件 @
84d7933e
...
...
@@ -300,22 +300,22 @@ static int set_pix_fmt(AVCodecContext *avctx, vpx_codec_caps_t codec_caps,
*
img_fmt
=
VPX_IMG_FMT_I444
;
return
0
;
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
case
AV_PIX_FMT_YUV420P10
LE
:
case
AV_PIX_FMT_YUV420P12
LE
:
case
AV_PIX_FMT_YUV420P10
:
case
AV_PIX_FMT_YUV420P12
:
if
(
codec_caps
&
VPX_CODEC_CAP_HIGHBITDEPTH
)
{
enccfg
->
g_bit_depth
=
enccfg
->
g_input_bit_depth
=
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV420P10
LE
?
10
:
12
;
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV420P10
?
10
:
12
;
enccfg
->
g_profile
=
2
;
*
img_fmt
=
VPX_IMG_FMT_I42016
;
*
flags
|=
VPX_CODEC_USE_HIGHBITDEPTH
;
return
0
;
}
break
;
case
AV_PIX_FMT_YUV422P10
LE
:
case
AV_PIX_FMT_YUV422P12
LE
:
case
AV_PIX_FMT_YUV422P10
:
case
AV_PIX_FMT_YUV422P12
:
if
(
codec_caps
&
VPX_CODEC_CAP_HIGHBITDEPTH
)
{
enccfg
->
g_bit_depth
=
enccfg
->
g_input_bit_depth
=
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV422P10
LE
?
10
:
12
;
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV422P10
?
10
:
12
;
enccfg
->
g_profile
=
3
;
*
img_fmt
=
VPX_IMG_FMT_I42216
;
*
flags
|=
VPX_CODEC_USE_HIGHBITDEPTH
;
...
...
@@ -323,11 +323,11 @@ static int set_pix_fmt(AVCodecContext *avctx, vpx_codec_caps_t codec_caps,
}
break
;
#if VPX_IMAGE_ABI_VERSION >= 3
case
AV_PIX_FMT_YUV440P10
LE
:
case
AV_PIX_FMT_YUV440P12
LE
:
case
AV_PIX_FMT_YUV440P10
:
case
AV_PIX_FMT_YUV440P12
:
if
(
codec_caps
&
VPX_CODEC_CAP_HIGHBITDEPTH
)
{
enccfg
->
g_bit_depth
=
enccfg
->
g_input_bit_depth
=
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV440P10
LE
?
10
:
12
;
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV440P10
?
10
:
12
;
enccfg
->
g_profile
=
3
;
*
img_fmt
=
VPX_IMG_FMT_I44016
;
*
flags
|=
VPX_CODEC_USE_HIGHBITDEPTH
;
...
...
@@ -335,11 +335,11 @@ static int set_pix_fmt(AVCodecContext *avctx, vpx_codec_caps_t codec_caps,
}
break
;
#endif
case
AV_PIX_FMT_YUV444P10
LE
:
case
AV_PIX_FMT_YUV444P12
LE
:
case
AV_PIX_FMT_YUV444P10
:
case
AV_PIX_FMT_YUV444P12
:
if
(
codec_caps
&
VPX_CODEC_CAP_HIGHBITDEPTH
)
{
enccfg
->
g_bit_depth
=
enccfg
->
g_input_bit_depth
=
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV444P10
LE
?
10
:
12
;
avctx
->
pix_fmt
==
AV_PIX_FMT_YUV444P10
?
10
:
12
;
enccfg
->
g_profile
=
3
;
*
img_fmt
=
VPX_IMG_FMT_I44416
;
*
flags
|=
VPX_CODEC_USE_HIGHBITDEPTH
;
...
...
libavcodec/version.h
浏览文件 @
84d7933e
...
...
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 24
#define LIBAVCODEC_VERSION_MICRO 10
3
#define LIBAVCODEC_VERSION_MICRO 10
4
#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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录