OSDN Git Service

HEVC: Add the frame store array
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 19 Jun 2014 15:23:30 +0000 (23:23 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Sat, 13 Dec 2014 16:42:17 +0000 (00:42 +0800)
The function to update the frame store index will be added later

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit e758dcb38b37773df7253bc2ea7910adaf31258d)

src/gen9_mfd.c
src/gen9_mfd.h

index 0cd6a56..44e9c8f 100644 (file)
@@ -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;
 }
 
index d3d546d..bcf7cf7 100644 (file)
@@ -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;