summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2017-12-01 14:44:58 -0800
committerXiang, Haihao <haihao.xiang@intel.com>2018-01-10 14:34:35 +0800
commit874a0da8c07e632168ae635507aeab24207806ed (patch)
treea186ed2c0cd1cc9ebf563cd9e6aea885d2afa3ba
parentce568d7c441febf4ae531bd3962990fb66a1bcdb (diff)
downloadlibva-intel-driver-874a0da8c07e632168ae635507aeab24207806ed.tar.gz
Stats/PreEnc: Add basic infrastructure for PreEnc enablement
Add necessary changes in common structures and apis to support Stats Entrypoint. * add support for the new entrypoint VAEntrypointStats * added new preproc encode operation enum * define virtual methods for preproc_set_curbe/send_surface * add fixes in vaQueryConfigEntrypoints(), vaQueryConfigProfiles, vaGetConfigAttributes(), vaQuerySurfaceAttributes(), vaCreateContext(), vaCreateBuffer(),vaBeginPicture(), vaRenderPicture() and vaEndPicture() * If PreEnc enabled, only invoke VME. Note: Enabled the PreEnc Support only for avc encode in Skylake. libva PR: https://github.com/01org/libva/pull/110 Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
-rw-r--r--src/i965_device_info.c1
-rw-r--r--src/i965_drv_video.c125
-rw-r--r--src/i965_drv_video.h14
-rw-r--r--src/i965_encoder.c78
-rw-r--r--src/i965_encoder.h2
-rw-r--r--src/i965_encoder_common.h17
6 files changed, 220 insertions, 17 deletions
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index fdfe6516..3e9485e8 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -374,6 +374,7 @@ static struct hw_codec_info skl_hw_codec_info = {
.has_hevc_encoding = 1,
.has_lp_h264_encoding = 1,
.has_fei_h264_encoding = 1,
+ .has_h264_preenc = 1,
.lp_h264_brc_mode = VA_RC_CQP,
.h264_brc_mode = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR | VA_RC_MB,
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index aa8b2db8..147cbe57 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -539,7 +539,8 @@ i965_QueryConfigProfiles(VADriverContextP ctx,
if (HAS_H264_DECODING(i965) ||
HAS_H264_ENCODING(i965) ||
HAS_LP_H264_ENCODING(i965) ||
- HAS_FEI_H264_ENCODING(i965)) {
+ HAS_FEI_H264_ENCODING(i965) ||
+ HAS_H264_PREENC(i965)) {
profile_list[i++] = VAProfileH264ConstrainedBaseline;
profile_list[i++] = VAProfileH264Main;
profile_list[i++] = VAProfileH264High;
@@ -651,7 +652,10 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
if (HAS_FEI_H264_ENCODING(i965))
entrypoint_list[n++] = VAEntrypointFEI;
+ if (HAS_H264_PREENC(i965))
+ entrypoint_list[n++] = VAEntrypointStats;
break;
+
case VAProfileH264MultiviewHigh:
case VAProfileH264StereoHigh:
if (HAS_H264_MVC_DECODING_PROFILE(i965, profile))
@@ -768,10 +772,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_H264_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP) ||
- (HAS_FEI_H264_ENCODING(i965) && entrypoint == VAEntrypointFEI)) {
+ (HAS_FEI_H264_ENCODING(i965) && entrypoint == VAEntrypointFEI) ||
+ (HAS_H264_PREENC(i965) && entrypoint == VAEntrypointStats)) {
va_status = VA_STATUS_SUCCESS;
} else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
- !HAS_LP_H264_ENCODING(i965) && !HAS_FEI_H264_ENCODING(i965)) {
+ !HAS_LP_H264_ENCODING(i965) && !HAS_FEI_H264_ENCODING(i965) &&
+ !HAS_H264_PREENC(i965)) {
va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
@@ -1033,7 +1039,9 @@ i965_GetConfigAttributes(VADriverContextP ctx,
} else if (entrypoint == VAEntrypointEncPicture) {
if (profile == VAProfileJPEGBaseline)
attrib_list[i].value = VA_ENC_PACKED_HEADER_RAW_DATA;
- }
+ } else if (entrypoint == VAEntrypointStats)
+ attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
+
break;
case VAConfigAttribEncMaxRefFrames:
@@ -1059,7 +1067,8 @@ i965_GetConfigAttributes(VADriverContextP ctx,
attrib_list[i].value = (1 << 0);
else
attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
- }
+ } else if (entrypoint == VAEntrypointStats)
+ attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
break;
@@ -1080,7 +1089,8 @@ i965_GetConfigAttributes(VADriverContextP ctx,
profile == VAProfileHEVCMain10)
attrib_list[i].value = ENCODER_QUALITY_RANGE_HEVC;
break;
- }
+ } else if (entrypoint == VAEntrypointStats)
+ attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
break;
case VAConfigAttribEncJPEG:
@@ -1113,7 +1123,9 @@ i965_GetConfigAttributes(VADriverContextP ctx,
profile == VAProfileH264High) {
if (IS_GEN9(i965->intel.device_info) &&
- (entrypoint == VAEntrypointEncSlice || entrypoint == VAEntrypointFEI))
+ (entrypoint == VAEntrypointEncSlice ||
+ entrypoint == VAEntrypointFEI ||
+ entrypoint == VAEntrypointStats))
attrib_list[i].value = 0;
else {
if (entrypoint == VAEntrypointEncSliceLP) {
@@ -1209,6 +1221,17 @@ i965_GetConfigAttributes(VADriverContextP ctx,
attrib_list[i].value = 4;
break;
+ case VAConfigAttribStats:
+ if (entrypoint == VAEntrypointStats) {
+ VAConfigAttribValStats *configVal =
+ (VAConfigAttribValStats*) & (attrib_list[i].value);
+ (configVal->bits).max_num_past_references = STATS_MAX_NUM_PAST_REFS;
+ (configVal->bits).max_num_future_references = STATS_MAX_NUM_FUTURE_REFS;
+ (configVal->bits).num_outputs = STATS_MAX_NUM_OUTPUTS;
+ (configVal->bits).interlaced = STATS_INTERLACED_SUPPORT;
+ }
+ break;
+
default:
/* Do nothing */
attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
@@ -1342,6 +1365,9 @@ i965_CreateConfig(VADriverContextP ctx,
else if ((entrypoint == VAEntrypointFEI) && attrib_found &&
!(attrib_found->value == VA_RC_CQP))
vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
+ else if ((entrypoint == VAEntrypointStats) && attrib_found &&
+ !(attrib_found->value == VA_RC_NONE))
+ vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
break;
default:
break;
@@ -2383,6 +2409,10 @@ i965_destroy_context(struct object_heap *heap, struct object_base *obj)
free(obj_context->codec_state.encode.packed_header_data_ext);
i965_release_buffer_store(&obj_context->codec_state.encode.encmb_map);
+ } else if (obj_context->codec_type == CODEC_PREENC) {
+ /* using the same encode codec_state for preenc too,
+ * since both sharig all most same code except in few places */
+ i965_release_buffer_store(&obj_context->codec_state.encode.stat_param_ext);
} else {
assert(obj_context->codec_state.decode.num_slice_params <= obj_context->codec_state.decode.max_slice_params);
assert(obj_context->codec_state.decode.num_slice_datas <= obj_context->codec_state.decode.max_slice_datas);
@@ -2545,6 +2575,13 @@ i965_CreateContext(VADriverContextP ctx,
}
assert(i965->codec_info->enc_hw_context_init);
obj_context->hw_context = i965->codec_info->enc_hw_context_init(ctx, obj_config);
+ } else if (VAEntrypointStats == obj_config->entrypoint) {
+ /* PreEnc sharing the ENC structures */
+ obj_context->codec_type = CODEC_PREENC;
+ memset(&obj_context->codec_state.encode, 0, sizeof(obj_context->codec_state.encode));
+ obj_context->codec_state.encode.current_render_target = VA_INVALID_ID;
+ assert(i965->codec_info->enc_hw_context_init);
+ obj_context->hw_context = i965->codec_info->enc_hw_context_init(ctx, obj_config);
} else {
obj_context->codec_type = CODEC_DEC;
memset(&obj_context->codec_state.decode, 0, sizeof(obj_context->codec_state.decode));
@@ -2685,6 +2722,12 @@ i965_create_buffer_internal(VADriverContextP ctx,
case VAEncFEIDistortionBufferType:
case VAEncFEIMBControlBufferType:
case VAEncFEIMVPredictorBufferType:
+ case VAStatsStatisticsParameterBufferType:
+ case VAStatsStatisticsBufferType:
+ case VAStatsStatisticsBottomFieldBufferType:
+ case VAStatsMVBufferType:
+ case VAStatsMVPredictorBufferType:
+
/* Ok */
break;
@@ -2752,7 +2795,12 @@ i965_create_buffer_internal(VADriverContextP ctx,
type == VAEncFEIMBCodeBufferType ||
type == VAEncFEIDistortionBufferType ||
type == VAEncFEIMBControlBufferType ||
- type == VAEncFEIMVPredictorBufferType) {
+ type == VAEncFEIMVPredictorBufferType ||
+ type == VAEncFEIMVPredictorBufferType ||
+ type == VAStatsStatisticsBufferType ||
+ type == VAStatsStatisticsBottomFieldBufferType ||
+ type == VAStatsMVBufferType ||
+ type == VAStatsMVPredictorBufferType) {
/* If the buffer is wrapped, the bo/buffer of buffer_store is bogus.
* So it is enough to allocate one 64 byte bo
@@ -3131,6 +3179,10 @@ i965_BeginPicture(VADriverContextP ctx,
i965_release_buffer_store(&obj_context->codec_state.encode.misc_param[i][j]);
i965_release_buffer_store(&obj_context->codec_state.encode.encmb_map);
+ } else if (obj_context->codec_type == CODEC_PREENC) {
+ /* PreEnc sharing the ENC structures */
+ i965_release_buffer_store(&obj_context->codec_state.encode.stat_param_ext);
+ obj_context->codec_state.encode.current_render_target = render_target;
} else {
obj_context->codec_state.decode.current_render_target = render_target;
i965_release_buffer_store(&obj_context->codec_state.decode.pic_param);
@@ -3397,6 +3449,7 @@ DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(huffman_table, huffman_table)
DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(sequence_parameter_ext, seq_param_ext)
DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(picture_parameter_ext, pic_param_ext)
DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(encmb_map, encmb_map)
+DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(statistics_parameter_ext, stat_param_ext)
#define DEF_RENDER_ENCODE_MULTI_BUFFER_FUNC(name, member) DEF_RENDER_MULTI_BUFFER_FUNC(encode, name, member)
// DEF_RENDER_ENCODE_MULTI_BUFFER_FUNC(slice_parameter, slice_params)
@@ -3755,6 +3808,42 @@ i965_proc_render_picture(VADriverContextP ctx,
return vaStatus;
}
+static VAStatus
+i965_pre_encoder_render_picture(VADriverContextP ctx,
+ VAContextID context,
+ VABufferID *buffers,
+ int num_buffers)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_context *obj_context = CONTEXT(context);
+ struct object_config *obj_config;
+ VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
+ int i;
+
+ ASSERT_RET(obj_context, VA_STATUS_ERROR_INVALID_CONTEXT);
+ obj_config = obj_context->obj_config;
+ ASSERT_RET(obj_config, VA_STATUS_ERROR_INVALID_CONFIG);
+
+ for (i = 0; i < num_buffers; i++) {
+ struct object_buffer *obj_buffer = BUFFER(buffers[i]);
+
+ if (!obj_buffer)
+ return VA_STATUS_ERROR_INVALID_BUFFER;
+
+ switch (obj_buffer->type) {
+ case VAStatsStatisticsParameterBufferType:
+ vaStatus = I965_RENDER_ENCODE_BUFFER(statistics_parameter_ext);
+ break;
+
+ default:
+ vaStatus = VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE;
+ break;
+ }
+ }
+
+ return vaStatus;
+}
+
VAStatus
i965_RenderPicture(VADriverContextP ctx,
VAContextID context,
@@ -3782,6 +3871,8 @@ i965_RenderPicture(VADriverContextP ctx,
(VAEntrypointEncSliceLP == obj_config->entrypoint) ||
(VAEntrypointFEI == obj_config->entrypoint)) {
vaStatus = i965_encoder_render_picture(ctx, context, buffers, num_buffers);
+ } else if (VAEntrypointStats == obj_config->entrypoint) {
+ vaStatus = i965_pre_encoder_render_picture(ctx, context, buffers, num_buffers);
} else {
vaStatus = i965_decoder_render_picture(ctx, context, buffers, num_buffers);
}
@@ -3836,6 +3927,13 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
" under packed SLICE_HEADER mode\n");
return VA_STATUS_ERROR_INVALID_PARAMETER;
}
+ } else if (obj_context->codec_type == CODEC_PREENC) {
+ ASSERT_RET((VAEntrypointStats == obj_config->entrypoint),
+ VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT);
+
+ if (!obj_context->codec_state.encode.stat_param_ext) {
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
+ }
} else {
if (obj_context->codec_state.decode.pic_param == NULL) {
return VA_STATUS_ERROR_INVALID_PARAMETER;
@@ -5777,6 +5875,11 @@ i965_GetSurfaceAttributes(
attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE;
break;
}
+ } else if (obj_config->entrypoint == VAEntrypointStats) {
+ if (attrib_list[i].value.value.i != VA_FOURCC_NV12) {
+ attrib_list[i].value.value.i = 0;
+ attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE;
+ }
} else {
if (obj_config->profile == VAProfileJPEGBaseline) {
attrib_list[i].value.value.i = 0; /* JPEG decoding always uses an internal format */
@@ -6255,6 +6358,12 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
attribs[i].value.value.i = VA_FOURCC_Y800;
i++;
}
+ } else if (obj_config->entrypoint == VAEntrypointStats) {
+ attribs[i].type = VASurfaceAttribPixelFormat;
+ attribs[i].value.type = VAGenericValueTypeInteger;
+ attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
+ attribs[i].value.value.i = VA_FOURCC_NV12;
+ i++;
}
}
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index 9b90480a..239aa03a 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -50,7 +50,7 @@
#include "i965_fourcc.h"
#define I965_MAX_PROFILES 20
-#define I965_MAX_ENTRYPOINTS 6
+#define I965_MAX_ENTRYPOINTS 7
#define I965_MAX_CONFIG_ATTRIBUTES 32
#define I965_MAX_IMAGE_FORMATS 10
#define I965_MAX_SUBPIC_FORMATS 6
@@ -86,6 +86,11 @@
#define ENCODER_LP_QUALITY_RANGE 8
+#define STATS_MAX_NUM_PAST_REFS 1
+#define STATS_MAX_NUM_FUTURE_REFS 1
+#define STATS_MAX_NUM_OUTPUTS 2
+#define STATS_INTERLACED_SUPPORT 0
+
#define HAS_MPEG2_DECODING(ctx) ((ctx)->codec_info->has_mpeg2_decoding && \
(ctx)->intel.has_bsd)
@@ -104,6 +109,8 @@
#define HAS_FEI_H264_ENCODING(ctx) ((ctx)->codec_info->has_fei_h264_encoding && \
(ctx)->intel.has_bsd)
+#define HAS_H264_PREENC(ctx) ((ctx)->codec_info->has_h264_preenc)
+
#define HAS_VC1_DECODING(ctx) ((ctx)->codec_info->has_vc1_decoding && \
(ctx)->intel.has_bsd)
@@ -280,6 +287,9 @@ struct encode_state {
struct buffer_store *misc_param[19][8];
+ /* To store the VAStatsStatisticsParameterBufferType buffers */
+ struct buffer_store *stat_param_ext;
+
VASurfaceID current_render_target;
struct object_surface *input_yuv_object;
struct object_surface *reconstructed_object;
@@ -297,6 +307,7 @@ struct proc_state {
#define CODEC_DEC 0
#define CODEC_ENC 1
#define CODEC_PROC 2
+#define CODEC_PREENC 3
union codec_state {
struct codec_state_base base;
@@ -486,6 +497,7 @@ struct hw_codec_info {
unsigned int has_lp_h264_encoding: 1;
unsigned int has_vp9_encoding: 1;
unsigned int has_fei_h264_encoding: 1;
+ unsigned int has_h264_preenc: 1;
unsigned int lp_h264_brc_mode;
unsigned int h264_brc_mode;
diff --git a/src/i965_encoder.c b/src/i965_encoder.c
index 8ad1c417..b0ec645c 100644
--- a/src/i965_encoder.c
+++ b/src/i965_encoder.c
@@ -959,6 +959,55 @@ error:
}
static VAStatus
+intel_pre_encoder_check_avc_parameter(VADriverContextP ctx,
+ struct encode_state *encode_state,
+ struct intel_encoder_context *encoder_context)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_surface *obj_surface = NULL;
+ VAStatsStatisticsParameterH264 *stat_param_h264 = NULL;
+ VAStatsStatisticsParameter*stat_param = NULL;
+
+ if (!encode_state->stat_param_ext)
+ goto error;
+ stat_param_h264 =
+ (VAStatsStatisticsParameterH264 *) encode_state->stat_param_ext->buffer;
+ stat_param = (VAStatsStatisticsParameter *)(&stat_param_h264->stats_params);
+
+ if (stat_param->input.flags == VA_PICTURE_STATS_INVALID)
+ goto error;
+
+ obj_surface = SURFACE(encoder_context->input_yuv_surface);
+ if (!obj_surface)
+ goto error;
+
+#if 0
+ /* FeiPreEncFixme: Since the driver is doing internal CSC for non NV12
+ input surfaces, this check may fail here */
+ /* Make sure the same input yuv has been provided in vaBeginPicture()
+ * and VAStatsStatisticsParameter */
+ if (obj_surface != SURFACE(stat_param->input.picture_id))
+ goto error;
+#endif
+
+ /* There is no reconstructed object in preenc. Here we just assigning
+ * the input yuv object to reconstructed object pointer inorder
+ * to use the same encode code path later on */
+ encode_state->reconstructed_object = obj_surface;
+
+ encoder_context->frame_width_in_pixel = obj_surface->orig_width;
+ encoder_context->frame_height_in_pixel = obj_surface->orig_height;
+
+ /* PreEnc only supports maxium of 1 past and 1 future reference */
+ if (stat_param->num_past_references > 1 || stat_param->num_future_references > 1)
+ goto error;
+
+ return VA_STATUS_SUCCESS;
+error:
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
+}
+
+static VAStatus
intel_encoder_check_mpeg2_parameter(VADriverContextP ctx,
struct encode_state *encode_state,
struct intel_encoder_context *encoder_context)
@@ -1300,11 +1349,20 @@ intel_encoder_sanity_check_input(VADriverContextP ctx,
case VAProfileH264High:
case VAProfileH264MultiviewHigh:
case VAProfileH264StereoHigh: {
- vaStatus = intel_encoder_check_avc_parameter(ctx, encode_state, encoder_context);
- if (vaStatus != VA_STATUS_SUCCESS)
+ if (!encoder_context->preenc_enabled) {
+ vaStatus = intel_encoder_check_avc_parameter(ctx, encode_state, encoder_context);
+ if (vaStatus != VA_STATUS_SUCCESS)
+ goto out;
+ vaStatus = intel_encoder_check_yuv_surface(ctx, profile, encode_state, encoder_context);
+ break;
+ } else {
+ vaStatus = intel_encoder_check_yuv_surface(ctx, profile, encode_state, encoder_context);
+ if (vaStatus != VA_STATUS_SUCCESS)
+ goto out;
+
+ vaStatus = intel_pre_encoder_check_avc_parameter(ctx, encode_state, encoder_context);
goto out;
- vaStatus = intel_encoder_check_yuv_surface(ctx, profile, encode_state, encoder_context);
- break;
+ }
}
case VAProfileMPEG2Simple:
@@ -1379,9 +1437,11 @@ intel_encoder_end_picture(VADriverContextP ctx,
/* VME or PAK stages are separately invoked if middleware configured the corresponding
* FEI modes through confgiruation attributes. On the other hand, ENC_PAK mode
- * will invoke both VME and PAK similar to the non fei use case */
- if (encoder_context->fei_enabled) {
- if (encoder_context->fei_function_mode == VA_FEI_FUNCTION_ENC) {
+ * will invoke both VME and PAK similar to the non fei use case.
+ * PreEnc always invoke the VME */
+ if (encoder_context->fei_enabled || encoder_context->preenc_enabled) {
+ if ((encoder_context->fei_function_mode == VA_FEI_FUNCTION_ENC) ||
+ (encoder_context->preenc_enabled)) {
if ((encoder_context->vme_context && encoder_context->vme_pipeline))
return encoder_context->vme_pipeline(ctx, profile, encode_state, encoder_context);
} else if (encoder_context->fei_function_mode == VA_FEI_FUNCTION_PAK) {
@@ -1508,6 +1568,10 @@ intel_enc_hw_context_init(VADriverContextP ctx,
encoder_context->fei_function_mode = obj_config->attrib_list[i].value;
}
}
+
+ if (obj_config->entrypoint == VAEntrypointStats)
+ encoder_context->preenc_enabled = 1;
+
break;
case VAProfileH264StereoHigh:
diff --git a/src/i965_encoder.h b/src/i965_encoder.h
index 0a06cd5e..a993aaad 100644
--- a/src/i965_encoder.h
+++ b/src/i965_encoder.h
@@ -116,6 +116,8 @@ struct intel_encoder_context {
unsigned int fei_enabled: 1;
unsigned int fei_function_mode; /* configured VA_FEI_FUNCTION_XXX */
+ unsigned int preenc_enabled: 1;
+
void (*vme_context_destroy)(void *vme_context);
VAStatus(*vme_pipeline)(VADriverContextP ctx,
VAProfile profile,
diff --git a/src/i965_encoder_common.h b/src/i965_encoder_common.h
index 35fb2b12..a9b7caaa 100644
--- a/src/i965_encoder_common.h
+++ b/src/i965_encoder_common.h
@@ -108,7 +108,8 @@ typedef enum _INTEL_GENERIC_ENC_OPERATION {
INTEL_GENERIC_ENC_MBENC_WIDI,
INTEL_GENERIC_ENC_WP,
INTEL_GENERIC_ENC_SFD, // Static frame detection
- INTEL_GENERIC_ENC_DYS
+ INTEL_GENERIC_ENC_DYS,
+ INTEL_GENERIC_ENC_PREPROC
} INTEL_GENERIC_ENC_OPERATION;
typedef enum _INTEL_MEDIA_STATE_TYPE {
@@ -309,6 +310,13 @@ struct generic_encoder_context {
struct intel_encoder_context *encoder_context,
void *param);
+ void (*pfn_set_curbe_preproc)(
+ VADriverContextP ctx,
+ struct encode_state *encode_state,
+ struct i965_gpe_context *gpe_context,
+ struct intel_encoder_context *encoder_context,
+ void *param);
+
//surface set function pointer
void (*pfn_send_scaling_surface)(
VADriverContextP ctx,
@@ -365,6 +373,13 @@ struct generic_encoder_context {
struct i965_gpe_context *gpe_context,
struct intel_encoder_context *encoder_context,
void *param);
+
+ void (*pfn_send_preproc_surface)(
+ VADriverContextP ctx,
+ struct encode_state *encode_state,
+ struct i965_gpe_context *gpe_context,
+ struct intel_encoder_context *encoder_context,
+ void *param);
};
/*
the definition for encoder codec state