.dec_hw_context_init = g4x_dec_hw_context_init,
.enc_hw_context_init = NULL,
.proc_hw_context_init = NULL,
+ .max_width = 2048,
+ .max_height = 2048,
};
extern struct hw_context *ironlake_dec_hw_context_init(VADriverContextP, struct object_config *);
.dec_hw_context_init = ironlake_dec_hw_context_init,
.enc_hw_context_init = NULL,
.proc_hw_context_init = i965_proc_context_init,
+ .max_width = 2048,
+ .max_height = 2048,
};
extern struct hw_context *gen6_dec_hw_context_init(VADriverContextP, struct object_config *);
.dec_hw_context_init = gen6_dec_hw_context_init,
.enc_hw_context_init = gen6_enc_hw_context_init,
.proc_hw_context_init = i965_proc_context_init,
+ .max_width = 2048,
+ .max_height = 2048,
};
extern struct hw_context *gen7_dec_hw_context_init(VADriverContextP, struct object_config *);
.dec_hw_context_init = gen7_dec_hw_context_init,
.enc_hw_context_init = gen7_enc_hw_context_init,
.proc_hw_context_init = i965_proc_context_init,
+ .max_width = 4096,
+ .max_height = 4096,
};
VAStatus
return vaStatus;
}
+ if (picture_width > i965->codec_info->max_width ||
+ picture_height > i965->codec_info->max_height) {
+ vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER;
+ return vaStatus;
+ }
+
/* Validate flag */
/* Validate picture dimensions */
contextID = NEW_CONTEXT_ID();
struct hw_context *(*dec_hw_context_init)(VADriverContextP, struct object_config *);
struct hw_context *(*enc_hw_context_init)(VADriverContextP, struct object_config *);
struct hw_context *(*proc_hw_context_init)(VADriverContextP, struct object_config *);
+ int max_width;
+ int max_height;
};