Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
d0897da9
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,发现更多精彩内容 >>
提交
d0897da9
编写于
8月 06, 2016
作者:
M
Mark Thompson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vaapi_h264: Constify pointers
(cherry picked from commit
03adfe91
)
上级
b05d8e71
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
15 deletion
+15
-15
libavcodec/vaapi_h264.c
libavcodec/vaapi_h264.c
+15
-15
未找到文件。
libavcodec/vaapi_h264.c
浏览文件 @
d0897da9
...
...
@@ -53,7 +53,7 @@ static void init_vaapi_pic(VAPictureH264 *va_pic)
* supersedes pic's field type if nonzero.
*/
static
void
fill_vaapi_pic
(
VAPictureH264
*
va_pic
,
H264Picture
*
pic
,
const
H264Picture
*
pic
,
int
pic_structure
)
{
if
(
pic_structure
==
0
)
...
...
@@ -91,7 +91,7 @@ typedef struct DPB {
* available. The decoded picture buffer's size must be large enough
* to receive the new VA API picture object.
*/
static
int
dpb_add
(
DPB
*
dpb
,
H264Picture
*
pic
)
static
int
dpb_add
(
DPB
*
dpb
,
const
H264Picture
*
pic
)
{
int
i
;
...
...
@@ -123,7 +123,7 @@ static int dpb_add(DPB *dpb, H264Picture *pic)
/** Fill in VA API reference frames array. */
static
int
fill_vaapi_ReferenceFrames
(
VAPictureParameterBufferH264
*
pic_param
,
H264Context
*
h
)
const
H264Context
*
h
)
{
DPB
dpb
;
int
i
;
...
...
@@ -135,13 +135,13 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param,
init_vaapi_pic
(
&
dpb
.
va_pics
[
i
]);
for
(
i
=
0
;
i
<
h
->
short_ref_count
;
i
++
)
{
H264Picture
*
const
pic
=
h
->
short_ref
[
i
];
const
H264Picture
*
pic
=
h
->
short_ref
[
i
];
if
(
pic
&&
pic
->
reference
&&
dpb_add
(
&
dpb
,
pic
)
<
0
)
return
-
1
;
}
for
(
i
=
0
;
i
<
16
;
i
++
)
{
H264Picture
*
const
pic
=
h
->
long_ref
[
i
];
const
H264Picture
*
pic
=
h
->
long_ref
[
i
];
if
(
pic
&&
pic
->
reference
&&
dpb_add
(
&
dpb
,
pic
)
<
0
)
return
-
1
;
}
...
...
@@ -157,7 +157,7 @@ static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param,
* @param[in] ref_count The number of reference pictures in ref_list
*/
static
void
fill_vaapi_RefPicList
(
VAPictureH264
RefPicList
[
32
],
H264Ref
*
ref_list
,
const
H264Ref
*
ref_list
,
unsigned
int
ref_count
)
{
unsigned
int
i
,
n
=
0
;
...
...
@@ -185,7 +185,7 @@ static void fill_vaapi_RefPicList(VAPictureH264 RefPicList[32],
* @param[out] chroma_weight VA API plain chroma weight table
* @param[out] chroma_offset VA API plain chroma offset table
*/
static
void
fill_vaapi_plain_pred_weight_table
(
H264Context
*
h
,
static
void
fill_vaapi_plain_pred_weight_table
(
const
H264Context
*
h
,
int
list
,
unsigned
char
*
luma_weight_flag
,
short
luma_weight
[
32
],
...
...
@@ -194,7 +194,7 @@ static void fill_vaapi_plain_pred_weight_table(H264Context *h,
short
chroma_weight
[
32
][
2
],
short
chroma_offset
[
32
][
2
])
{
H264SliceContext
*
sl
=
&
h
->
slice_ctx
[
0
];
const
H264SliceContext
*
sl
=
&
h
->
slice_ctx
[
0
];
unsigned
int
i
,
j
;
*
luma_weight_flag
=
sl
->
pwt
.
luma_weight_flag
[
list
];
...
...
@@ -227,8 +227,8 @@ static int vaapi_h264_start_frame(AVCodecContext *avctx,
av_unused
const
uint8_t
*
buffer
,
av_unused
uint32_t
size
)
{
H264Context
*
const
h
=
avctx
->
priv_data
;
FFVAContext
*
const
vactx
=
ff_vaapi_get_context
(
avctx
);
const
H264Context
*
h
=
avctx
->
priv_data
;
FFVAContext
*
vactx
=
ff_vaapi_get_context
(
avctx
);
const
PPS
*
pps
=
h
->
ps
.
pps
;
const
SPS
*
sps
=
h
->
ps
.
sps
;
VAPictureParameterBufferH264
*
pic_param
;
...
...
@@ -293,8 +293,8 @@ static int vaapi_h264_start_frame(AVCodecContext *avctx,
/** End a hardware decoding based frame. */
static
int
vaapi_h264_end_frame
(
AVCodecContext
*
avctx
)
{
FFVAContext
*
const
vactx
=
ff_vaapi_get_context
(
avctx
);
H264Context
*
const
h
=
avctx
->
priv_data
;
FFVAContext
*
vactx
=
ff_vaapi_get_context
(
avctx
);
const
H264Context
*
h
=
avctx
->
priv_data
;
H264SliceContext
*
sl
=
&
h
->
slice_ctx
[
0
];
int
ret
;
...
...
@@ -318,9 +318,9 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
const
uint8_t
*
buffer
,
uint32_t
size
)
{
FFVAContext
*
const
vactx
=
ff_vaapi_get_context
(
avctx
);
H264Context
*
const
h
=
avctx
->
priv_data
;
H264SliceContext
*
sl
=
&
h
->
slice_ctx
[
0
];
FFVAContext
*
vactx
=
ff_vaapi_get_context
(
avctx
);
const
H264Context
*
h
=
avctx
->
priv_data
;
const
H264SliceContext
*
sl
=
&
h
->
slice_ctx
[
0
];
VASliceParameterBufferH264
*
slice_param
;
/* Fill in VASliceParameterBufferH264. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录