summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2010-06-08 09:19:13 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2010-06-08 09:19:13 +0800
commitda6e7fd052baa080f11fab45ef83ecca4b600df9 (patch)
treebcd86d2ec512982bedf477566e7ab22c71e85100
parenta551918d1e034071950c42cf3594d31174c0fe98 (diff)
i965_drv_video: [H.264] some code clean upi965_h264
-rw-r--r--i965_drv_video/i965_avc_bsd.c9
-rw-r--r--i965_drv_video/i965_avc_ildb.c2
-rw-r--r--i965_drv_video/i965_media_h264.c3
3 files changed, 3 insertions, 11 deletions
diff --git a/i965_drv_video/i965_avc_bsd.c b/i965_drv_video/i965_avc_bsd.c
index abd70f6..1334f26 100644
--- a/i965_drv_video/i965_avc_bsd.c
+++ b/i965_drv_video/i965_avc_bsd.c
@@ -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
diff --git a/i965_drv_video/i965_avc_ildb.c b/i965_drv_video/i965_avc_ildb.c
index 997b4d1..9cdfc53 100644
--- a/i965_drv_video/i965_avc_ildb.c
+++ b/i965_drv_video/i965_avc_ildb.c
@@ -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) {
diff --git a/i965_drv_video/i965_media_h264.c b/i965_drv_video/i965_media_h264.c
index d7f251b..95efa3f 100644
--- a/i965_drv_video/i965_media_h264.c
+++ b/i965_drv_video/i965_media_h264.c
@@ -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;