{
struct intel_driver_data *intel = intel_driver_data(ctx);
struct intel_encoder_context *encoder_context = calloc(1, sizeof(struct intel_encoder_context));
+ int i;
encoder_context->base.destroy = intel_encoder_context_destroy;
encoder_context->base.run = intel_encoder_end_picture;
encoder_context->base.batch = intel_batchbuffer_new(intel, I915_EXEC_RENDER);
+ encoder_context->rate_control_mode = VA_RC_NONE;
+
+ for (i = 0; i < obj_config->num_attribs; i++) {
+ if (obj_config->attrib_list[i].type == VAConfigAttribRateControl) {
+ encoder_context->rate_control_mode = obj_config->attrib_list[i].value;
+ break;
+ }
+ }
gen6_vme_context_init(ctx, encoder_context);
assert(encoder_context->vme_context);