The function to update the frame store index will be added later
Signed-off-by: Xiang, Haihao <[email protected]>
---
src/gen9_mfd.c | 7 +++++++
src/gen9_mfd.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/src/gen9_mfd.c b/src/gen9_mfd.c
index 0cd6a56..44e9c8f 100644
--- a/src/gen9_mfd.c
+++ b/src/gen9_mfd.c
@@ -253,6 +253,7 @@ gen9_hcpd_context_init(VADriverContextP ctx, struct
object_config *object_config
{
struct intel_driver_data *intel = intel_driver_data(ctx);
struct gen9_hcpd_context *gen9_hcpd_context = calloc(1, sizeof(struct
gen9_hcpd_context));
+ int i;
if (!gen9_hcpd_context)
return NULL;
@@ -261,6 +262,12 @@ gen9_hcpd_context_init(VADriverContextP ctx, struct
object_config *object_config
gen9_hcpd_context->base.run = gen9_hcpd_decode_picture;
gen9_hcpd_context->base.batch = intel_batchbuffer_new(intel,
I915_EXEC_VEBOX, 0);
+ for (i = 0; i < ARRAY_ELEMS(gen9_hcpd_context->reference_surfaces); i++) {
+ gen9_hcpd_context->reference_surfaces[i].surface_id = VA_INVALID_ID;
+ gen9_hcpd_context->reference_surfaces[i].frame_store_id = -1;
+ gen9_hcpd_context->reference_surfaces[i].obj_surface = NULL;
+ }
+
return (struct hw_context *)gen9_hcpd_context;
}
diff --git a/src/gen9_mfd.h b/src/gen9_mfd.h
index d3d546d..bcf7cf7 100644
--- a/src/gen9_mfd.h
+++ b/src/gen9_mfd.h
@@ -41,6 +41,8 @@ struct gen9_hcpd_context
{
struct hw_context base;
+ GenFrameStore reference_surfaces[MAX_GEN_HCP_REFERENCE_FRAMES];
+
uint16_t picture_width_in_pixels;
uint16_t picture_height_in_pixels;
uint16_t picture_width_in_ctbs;
--
1.9.1
_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva