Commit 0c70b6b6 authored by Xiang, Haihao's avatar Xiang, Haihao

i965_drv_video: move AVC-ILDB data buffer to struct i965_h264_context

parent 7d5877d5
......@@ -433,7 +433,7 @@ i965_avc_bsd_buf_base_state(VADriverContextP ctx,
OUT_BCS_RELOC(ctx, i965_h264_context->avc_it_data.bo,
I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
(i965_h264_context->avc_it_data.write_offset << 6));
OUT_BCS_RELOC(ctx, i965_avc_bsd_context->ildb_data.bo,
OUT_BCS_RELOC(ctx, i965_h264_context->avc_ildb_data.bo,
I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
0);
......@@ -1002,14 +1002,6 @@ i965_avc_bsd_decode_init(VADriverContextP ctx)
64);
assert(bo);
i965_avc_bsd_context->mpr_row_store.bo = bo;
dri_bo_unreference(i965_avc_bsd_context->ildb_data.bo);
bo = dri_bo_alloc(i965->intel.bufmgr,
"ildb data",
0x100000, /* at least 1044480 bytes */
64);
assert(bo);
i965_avc_bsd_context->ildb_data.bo = bo;
}
Bool
......@@ -1017,7 +1009,6 @@ i965_avc_bsd_ternimate(struct i965_avc_bsd_context *i965_avc_bsd_context)
{
dri_bo_unreference(i965_avc_bsd_context->bsd_raw_store.bo);
dri_bo_unreference(i965_avc_bsd_context->mpr_row_store.bo);
dri_bo_unreference(i965_avc_bsd_context->ildb_data.bo);
return True;
}
......@@ -54,10 +54,6 @@ struct i965_avc_bsd_context
dri_bo *bo;
long write_offset;
} avc_it_data;
struct {
dri_bo *bo;
} ildb_data;
};
void i965_avc_bsd_pipeline(VADriverContextP, struct decode_state *);
......
......@@ -792,6 +792,14 @@ i965_media_h264_decode_init(VADriverContextP ctx)
dri_bo_reference(media_state->indirect_object.bo);
media_state->indirect_object.offset = i965_h264_context->avc_it_data.write_offset;
dri_bo_unreference(i965_h264_context->avc_ildb_data.bo);
bo = dri_bo_alloc(i965->intel.bufmgr,
"AVC-ILDB Data Buffer",
0x100000, /* at least 1044480 bytes */
64);
assert(bo);
i965_h264_context->avc_ildb_data.bo = bo;
/* bsd pipeline */
i965_avc_bsd_decode_init(ctx);
......@@ -892,6 +900,7 @@ i965_media_h264_ternimate(VADriverContextP ctx)
i965_avc_bsd_ternimate(&i965_h264_context->i965_avc_bsd_context);
dri_bo_unreference(i965_h264_context->avc_it_command_mb_info.bo);
dri_bo_unreference(i965_h264_context->avc_it_data.bo);
dri_bo_unreference(i965_h264_context->avc_ildb_data.bo);
free(i965_h264_context);
media_state->private_context = NULL;
}
......
......@@ -25,6 +25,10 @@ struct i965_h264_context
long write_offset;
} avc_it_data;
struct {
dri_bo *bo;
} avc_ildb_data;
struct {
unsigned int width_in_mbs;
unsigned int height_in_mbs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment