Commit da6e7fd0 authored by Xiang, Haihao's avatar Xiang, Haihao

i965_drv_video: [H.264] some code clean up

parent a551918d
......@@ -986,7 +986,6 @@ i965_avc_bsd_pipeline(VADriverContextP ctx, struct decode_state *decode_state)
struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context;
VAPictureParameterBufferH264 *pic_param;
VASliceParameterBufferH264 *slice_param;
unsigned int *object_command;
int i, j;
assert(decode_state->pic_param && decode_state->pic_param->buffer);
......@@ -1047,14 +1046,6 @@ i965_avc_bsd_pipeline(VADriverContextP ctx, struct decode_state *decode_state)
intel_batchbuffer_emit_mi_flush_bcs(ctx);
intel_batchbuffer_end_atomic_bcs(ctx);
intel_batchbuffer_flush_bcs(ctx);
dri_bo_map(i965_h264_context->avc_it_command_mb_info.bo, True);
assert(i965_h264_context->avc_it_command_mb_info.bo->virtual);
object_command = i965_h264_context->avc_it_command_mb_info.bo->virtual;
memset(object_command, 0, i965_h264_context->avc_it_command_mb_info.mbs * i965_h264_context->use_avc_hw_scoreboard * MB_CMD_IN_BYTES);
object_command += i965_h264_context->avc_it_command_mb_info.mbs * (1 + i965_h264_context->use_avc_hw_scoreboard) * MB_CMD_IN_DWS;
*object_command = MI_BATCH_BUFFER_END;
dri_bo_unmap(i965_h264_context->avc_it_command_mb_info.bo);
}
void
......
......@@ -517,7 +517,7 @@ i965_avc_ildb_objects(VADriverContextP ctx)
struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context;
struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context;
BEGIN_BATCH(ctx, 4);
BEGIN_BATCH(ctx, 6);
OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4);
switch (avc_ildb_context->picture_type) {
......
......@@ -734,6 +734,7 @@ i965_media_h264_objects(VADriverContextP ctx, struct decode_state *decode_state)
object_command = i965_h264_context->avc_it_command_mb_info.bo->virtual;
memset(object_command, 0, i965_h264_context->avc_it_command_mb_info.mbs * i965_h264_context->use_avc_hw_scoreboard * MB_CMD_IN_BYTES);
object_command += i965_h264_context->avc_it_command_mb_info.mbs * (1 + i965_h264_context->use_avc_hw_scoreboard) * MB_CMD_IN_DWS;
*object_command++ = 0;
*object_command = MI_BATCH_BUFFER_END;
dri_bo_unmap(i965_h264_context->avc_it_command_mb_info.bo);
......@@ -867,7 +868,7 @@ i965_media_h264_decode_init(VADriverContextP ctx, struct decode_state *decode_st
dri_bo_unreference(i965_h264_context->avc_it_command_mb_info.bo);
bo = dri_bo_alloc(i965->intel.bufmgr,
"avc it command mb info",
i965_h264_context->avc_it_command_mb_info.mbs * MB_CMD_IN_BYTES * (1 + i965_h264_context->use_avc_hw_scoreboard) + 4,
i965_h264_context->avc_it_command_mb_info.mbs * MB_CMD_IN_BYTES * (1 + i965_h264_context->use_avc_hw_scoreboard) + 8,
0x1000);
assert(bo);
i965_h264_context->avc_it_command_mb_info.bo = bo;
......
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