diff options
author | Pengfei Qu <Pengfei.Qu@intel.com> | 2017-05-16 15:49:13 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-06-12 14:04:01 +0800 |
commit | 3416db0c8280a321db0b8d2afde9c30c3229ee7d (patch) | |
tree | 9f19eba9d89509a781eb490bcf883916651f8e24 /src | |
parent | 53fa3daa12f6dbdd391d24ab479dc601ae37a89d (diff) | |
download | libva-intel-driver-3416db0c8280a321db0b8d2afde9c30c3229ee7d.tar.gz |
ENC: add RC query for AVC mb rc mode on SKL+
v0: add h264_brc_mode to store the RC capability of H264
Fixes #168
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/i965_device_info.c | 14 | ||||
-rw-r--r-- | src/i965_drv_video.c | 8 | ||||
-rw-r--r-- | src/i965_drv_video.h | 1 |
3 files changed, 20 insertions, 3 deletions
diff --git a/src/i965_device_info.c b/src/i965_device_info.c index 2019b978..629b1f2a 100644 --- a/src/i965_device_info.c +++ b/src/i965_device_info.c @@ -132,6 +132,8 @@ static struct hw_codec_info snb_hw_codec_info = { .has_tiled_surface = 1, .has_di_motion_adptive = 1, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR, + .num_filters = 2, .filters = { { VAProcFilterNoiseReduction, I965_RING_NULL }, @@ -173,6 +175,8 @@ static struct hw_codec_info ivb_hw_codec_info = { .has_di_motion_adptive = 1, .has_di_motion_compensated = 1, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR, + .num_filters = 2, .filters = { { VAProcFilterNoiseReduction, I965_RING_NULL }, @@ -217,6 +221,8 @@ static struct hw_codec_info hsw_hw_codec_info = { .has_di_motion_compensated = 1, .has_h264_mvc_encoding = 1, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR, + .num_filters = 5, .filters = { { VAProcFilterNoiseReduction, I965_RING_VEBOX }, @@ -262,6 +268,8 @@ static struct hw_codec_info bdw_hw_codec_info = { .has_vp8_decoding = 1, .has_h264_mvc_encoding = 1, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR, + .num_filters = 5, .filters = { { VAProcFilterNoiseReduction, I965_RING_VEBOX }, @@ -309,6 +317,8 @@ static struct hw_codec_info chv_hw_codec_info = { .has_h264_mvc_encoding = 1, .has_hevc_decoding = 1, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR, + .num_filters = 5, .filters = { { VAProcFilterNoiseReduction, I965_RING_VEBOX }, @@ -365,6 +375,7 @@ static struct hw_codec_info skl_hw_codec_info = { .has_lp_h264_encoding = 1, .lp_h264_brc_mode = VA_RC_CQP, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB, .num_filters = 5, .filters = { @@ -423,6 +434,7 @@ static struct hw_codec_info bxt_hw_codec_info = { .has_lp_h264_encoding = 1, .lp_h264_brc_mode = VA_RC_CQP, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB, .num_filters = 5, .filters = { @@ -486,6 +498,7 @@ static struct hw_codec_info kbl_hw_codec_info = { .has_lp_h264_encoding = 1, .lp_h264_brc_mode = VA_RC_CQP, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB, .num_filters = 5, .filters = { @@ -550,6 +563,7 @@ static struct hw_codec_info glk_hw_codec_info = { .has_lp_h264_encoding = 1, .lp_h264_brc_mode = VA_RC_CQP, + .h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB, .num_filters = 5, .filters = { diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index eb203d54..aab16e8b 100644 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -975,12 +975,14 @@ i965_GetConfigAttributes(VADriverContextP ctx, if (profile == VAProfileVP8Version0_3 || profile == VAProfileVP9Profile0 || - profile == VAProfileH264ConstrainedBaseline || - profile == VAProfileH264Main || - profile == VAProfileH264High || profile == VAProfileHEVCMain) attrib_list[i].value |= VA_RC_VBR; + if (profile == VAProfileH264ConstrainedBaseline || + profile == VAProfileH264Main || + profile == VAProfileH264High) + attrib_list[i].value = i965->codec_info->h264_brc_mode; + break; } else if (entrypoint == VAEntrypointEncSliceLP) { struct i965_driver_data * const i965 = i965_driver_data(ctx); diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h index abc85be7..626e13c6 100644 --- a/src/i965_drv_video.h +++ b/src/i965_drv_video.h @@ -480,6 +480,7 @@ struct hw_codec_info { unsigned int has_vp9_encoding: 1; unsigned int lp_h264_brc_mode; + unsigned int h264_brc_mode; unsigned int num_filters; struct i965_filter filters[VAProcFilterCount]; |