if (HAS_H264_DECODING(i965) ||
HAS_H264_ENCODING(i965) ||
- HAS_LP_H264_ENCODING(i965)) {
+ HAS_LP_H264_ENCODING(i965) ||
+ HAS_FEI_H264_ENCODING(i965)) {
profile_list[i++] = VAProfileH264ConstrainedBaseline;
profile_list[i++] = VAProfileH264Main;
profile_list[i++] = VAProfileH264High;
if (HAS_LP_H264_ENCODING(i965))
entrypoint_list[n++] = VAEntrypointEncSliceLP;
+ if (HAS_FEI_H264_ENCODING(i965))
+ entrypoint_list[n++] = VAEntrypointFEI;
+
break;
case VAProfileH264MultiviewHigh:
case VAProfileH264StereoHigh:
case VAProfileH264High:
if ((HAS_H264_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
- (HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
+ (HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP) ||
+ (HAS_FEI_H264_ENCODING(i965) && entrypoint == VAEntrypointFEI)) {
va_status = VA_STATUS_SUCCESS;
} else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
- !HAS_LP_H264_ENCODING(i965)) {
+ !HAS_LP_H264_ENCODING(i965) && !HAS_FEI_H264_ENCODING(i965)) {
va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
attrib_list[i].value = i965->codec_info->lp_h264_brc_mode;
else
attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
+ } else if (entrypoint == VAEntrypointFEI) {
+ /* Only CQP is supported in FEI Entrypoint */
+ if (profile == VAProfileH264ConstrainedBaseline ||
+ profile == VAProfileH264Main ||
+ profile == VAProfileH264High)
+ attrib_list[i].value = VA_RC_CQP;
+ else
+ attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
} else
attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
case VAConfigAttribEncPackedHeaders:
if (entrypoint == VAEntrypointEncSlice ||
- entrypoint == VAEntrypointEncSliceLP) {
+ entrypoint == VAEntrypointEncSliceLP ||
+ entrypoint == VAEntrypointFEI) {
attrib_list[i].value = VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_PICTURE | VA_ENC_PACKED_HEADER_MISC;
if (profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
break;
case VAConfigAttribEncMaxRefFrames:
- if (entrypoint == VAEntrypointEncSlice) {
+ if (entrypoint == VAEntrypointEncSlice || entrypoint == VAEntrypointFEI) {
attrib_list[i].value = (1 << 16) | (1 << 0);
if (profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
case VAConfigAttribEncQualityRange:
if (entrypoint == VAEntrypointEncSlice ||
- entrypoint == VAEntrypointEncSliceLP) {
+ entrypoint == VAEntrypointEncSliceLP ||
+ entrypoint == VAEntrypointFEI) {
attrib_list[i].value = 1;
if (profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
case VAConfigAttribEncROI:
if (entrypoint == VAEntrypointEncSlice ||
- entrypoint == VAEntrypointEncSliceLP) {
+ entrypoint == VAEntrypointEncSliceLP ||
+ entrypoint == VAEntrypointFEI) {
VAConfigAttribValEncROI *roi_config =
(VAConfigAttribValEncROI *) & (attrib_list[i].value);
profile == VAProfileH264High) {
if (IS_GEN9(i965->intel.device_info) &&
- entrypoint == VAEntrypointEncSlice)
+ (entrypoint == VAEntrypointEncSlice || entrypoint == VAEntrypointFEI))
attrib_list[i].value = 0;
else {
if (entrypoint == VAEntrypointEncSliceLP) {
profile == VAProfileHEVCMain10) {
attrib_list[i].value = I965_MAX_NUM_SLICE;
}
- } else if (entrypoint == VAEntrypointEncSliceLP) {
+ } else if (entrypoint == VAEntrypointEncSliceLP || entrypoint == VAEntrypointFEI) {
if ((profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
profile == VAProfileH264High) ||
}
break;
+
+ case VAConfigAttribFEIFunctionType:
+ /* Supporing all possible modes of FEI */
+ attrib_list[i].value = VA_FEI_FUNCTION_ENC |
+ VA_FEI_FUNCTION_PAK | VA_FEI_FUNCTION_ENC_PAK;
+ break;
+
+ case VAConfigAttribFEIMVPredictors:
+ attrib_list[i].value = 4;
+ break;
+
default:
/* Do nothing */
attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
} else if (profile == VAProfileHEVCMain ||
profile == VAProfileHEVCMain10)
attrib.value = I965_MAX_NUM_SLICE;
- } else if (entrypoint == VAEntrypointEncSliceLP) {
+ } else if (entrypoint == VAEntrypointEncSliceLP || entrypoint == VAEntrypointFEI) {
if ((profile == VAProfileH264ConstrainedBaseline ||
profile == VAProfileH264Main ||
profile == VAProfileH264High) ||
obj_context->hw_context = i965->codec_info->proc_hw_context_init(ctx, obj_config);
} else if ((VAEntrypointEncSlice == obj_config->entrypoint) ||
(VAEntrypointEncPicture == obj_config->entrypoint) ||
- (VAEntrypointEncSliceLP == obj_config->entrypoint)) {
+ (VAEntrypointEncSliceLP == obj_config->entrypoint) ||
+ (VAEntrypointFEI == obj_config->entrypoint)) {
VAConfigAttrib *packed_attrib;
obj_context->codec_type = CODEC_ENC;
memset(&obj_context->codec_state.encode, 0, sizeof(obj_context->codec_state.encode));
case VAHuffmanTableBufferType:
case VAProbabilityBufferType:
case VAEncMacroblockMapBufferType:
+ case VAEncQPBufferType:
+ case VAEncFEIMVBufferType:
+ case VAEncFEIMBCodeBufferType:
+ case VAEncFEIDistortionBufferType:
+ case VAEncFEIMBControlBufferType:
+ case VAEncFEIMVPredictorBufferType:
/* Ok */
break;
type == VAImageBufferType ||
type == VAEncCodedBufferType ||
type == VAEncMacroblockMapBufferType ||
- type == VAProbabilityBufferType) {
+ type == VAProbabilityBufferType ||
+ type == VAEncQPBufferType ||
+ type == VAEncFEIMVBufferType ||
+ type == VAEncFEIMBCodeBufferType ||
+ type == VAEncFEIDistortionBufferType ||
+ type == VAEncFEIMBControlBufferType ||
+ type == VAEncFEIMVPredictorBufferType) {
/* If the buffer is wrapped, the bo/buffer of buffer_store is bogus.
* So it is enough to allocate one 64 byte bo
vaStatus = i965_proc_render_picture(ctx, context, buffers, num_buffers);
} else if ((VAEntrypointEncSlice == obj_config->entrypoint) ||
(VAEntrypointEncPicture == obj_config->entrypoint) ||
- (VAEntrypointEncSliceLP == obj_config->entrypoint)) {
+ (VAEntrypointEncSliceLP == obj_config->entrypoint) ||
+ (VAEntrypointFEI == obj_config->entrypoint)) {
vaStatus = i965_encoder_render_picture(ctx, context, buffers, num_buffers);
} else {
vaStatus = i965_decoder_render_picture(ctx, context, buffers, num_buffers);
} else if (obj_context->codec_type == CODEC_ENC) {
ASSERT_RET(((VAEntrypointEncSlice == obj_config->entrypoint) ||
(VAEntrypointEncPicture == obj_config->entrypoint) ||
- (VAEntrypointEncSliceLP == obj_config->entrypoint)),
+ (VAEntrypointEncSliceLP == obj_config->entrypoint) ||
+ (VAEntrypointFEI == obj_config->entrypoint)),
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT);
if (obj_context->codec_state.encode.num_packed_header_params_ext !=
IS_GEN9(i965->intel.device_info)) {
if (obj_config->entrypoint == VAEntrypointEncSlice ||
obj_config->entrypoint == VAEntrypointVideoProc ||
- obj_config->entrypoint == VAEntrypointEncSliceLP) {
+ obj_config->entrypoint == VAEntrypointEncSliceLP ||
+ obj_config->entrypoint == VAEntrypointFEI) {
switch (attrib_list[i].value.value.i) {
case VA_FOURCC_NV12:
case VA_FOURCC_I420:
} else if (obj_config->entrypoint == VAEntrypointEncSlice || /* encode */
obj_config->entrypoint == VAEntrypointVideoProc ||
obj_config->entrypoint == VAEntrypointEncSliceLP ||
- obj_config->entrypoint == VAEntrypointEncPicture) {
+ obj_config->entrypoint == VAEntrypointEncPicture ||
+ obj_config->entrypoint == VAEntrypointFEI) {
if (obj_config->profile == VAProfileHEVCMain10) {
attribs[i].type = VASurfaceAttribPixelFormat;