profile != VAProfileMPEG2Simple)
attrib_list[i].value |= VA_RC_CBR;
- if (profile == VAProfileVP9Profile0 ||
- profile == VAProfileH264ConstrainedBaseline ||
- profile == VAProfileH264Main ||
- profile == VAProfileH264High ||
+ if (profile == VAProfileVP8Version0_3 ||
+ profile == VAProfileVP9Profile0 ||
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);
break;
case VAConfigAttribEncMaxRefFrames:
- if (entrypoint == VAEntrypointEncSlice)
+ if (entrypoint == VAEntrypointEncSlice) {
attrib_list[i].value = (1 << 16) | (1 << 0);
- else if (entrypoint == VAEntrypointEncSliceLP) {
+ if (profile == VAProfileH264ConstrainedBaseline ||
+ profile == VAProfileH264Main ||
+ profile == VAProfileH264High ||
+ profile == VAProfileH264StereoHigh ||
+ profile == VAProfileH264MultiviewHigh) {
+ if (IS_GEN9(i965->intel.device_info))
+ attrib_list[i].value = (2 << 16) | (8 << 0);
+ }
+ } else if (entrypoint == VAEntrypointEncSliceLP) {
/* Don't support B frame for low power mode */
if (profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
case VAConfigAttribEncROI:
if (entrypoint == VAEntrypointEncSlice ||
entrypoint == VAEntrypointEncSliceLP) {
+ VAConfigAttribValEncROI *roi_config =
+ (VAConfigAttribValEncROI *) & (attrib_list[i].value);
if (profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
entrypoint == VAEntrypointEncSlice)
attrib_list[i].value = 0;
else {
-
- VAConfigAttribValEncROI *roi_config =
- (VAConfigAttribValEncROI *) & (attrib_list[i].value);
-
if (entrypoint == VAEntrypointEncSliceLP) {
roi_config->bits.num_roi_regions = 3;
roi_config->bits.roi_rc_priority_support = 0;
roi_config->bits.roi_rc_qp_delat_support = 1;
}
}
+ } else if (profile == VAProfileHEVCMain ||
+ profile == VAProfileHEVCMain10) {
+ roi_config->bits.num_roi_regions =
+ I965_MAX_NUM_ROI_REGIONS;
+ roi_config->bits.roi_rc_priority_support = 1;
+ roi_config->bits.roi_rc_qp_delat_support = 1;
} else {
attrib_list[i].value = 0;
}
profile == VAProfileH264High) ||
profile == VAProfileH264StereoHigh ||
profile == VAProfileH264MultiviewHigh ||
- profile == VAProfileHEVCMain ||
+ profile == VAProfileHEVCMain ||
profile == VAProfileHEVCMain10) {
attrib_list[i].value = VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS;
}
obj_surface->height = memory_attibute->data_size / obj_surface->width;
else
obj_surface->height = memory_attibute->offsets[1] / obj_surface->width;
- ASSERT_RET(IS_ALIGNED(obj_surface->height, 16), VA_STATUS_ERROR_INVALID_PARAMETER);
- ASSERT_RET(obj_surface->height >= obj_surface->orig_height, VA_STATUS_ERROR_INVALID_PARAMETER);
+
+ if (memory_attibute->num_planes > 1) {
+ ASSERT_RET(IS_ALIGNED(obj_surface->height, 16), VA_STATUS_ERROR_INVALID_PARAMETER);
+ ASSERT_RET(obj_surface->height >= obj_surface->orig_height, VA_STATUS_ERROR_INVALID_PARAMETER);
+ }
if (tiling) {
ASSERT_RET(IS_ALIGNED(obj_surface->width, 128), VA_STATUS_ERROR_INVALID_PARAMETER);
- ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER);
+
+ if (memory_attibute->num_planes > 1)
+ ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER);
} else {
ASSERT_RET(IS_ALIGNED(obj_surface->width, i965->codec_info->min_linear_wpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
- ASSERT_RET(IS_ALIGNED(obj_surface->height, i965->codec_info->min_linear_hpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
+
+ if (memory_attibute->num_planes > 1)
+ ASSERT_RET(IS_ALIGNED(obj_surface->height, i965->codec_info->min_linear_hpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
}
obj_surface->x_cb_offset = 0; /* X offset is always 0 */
i965_release_buffer_store(&obj_context->codec_state.decode.pic_param);
i965_release_buffer_store(&obj_context->codec_state.decode.iq_matrix);
+ i965_release_buffer_store(&obj_context->codec_state.decode.huffman_table);
i965_release_buffer_store(&obj_context->codec_state.decode.bit_plane);
for (i = 0; i < obj_context->codec_state.decode.num_slice_params; i++)