hardware/intel/libva
Revisão | da6e7fd052baa080f11fab45ef83ecca4b600df9 (tree) |
---|---|
Hora | 2010-06-08 10:19:13 |
Autor | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
i965_drv_video: [H.264] some code clean up
@@ -986,7 +986,6 @@ i965_avc_bsd_pipeline(VADriverContextP ctx, struct decode_state *decode_state) | ||
986 | 986 | struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; |
987 | 987 | VAPictureParameterBufferH264 *pic_param; |
988 | 988 | VASliceParameterBufferH264 *slice_param; |
989 | - unsigned int *object_command; | |
990 | 989 | int i, j; |
991 | 990 | |
992 | 991 | 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) | ||
1047 | 1046 | intel_batchbuffer_emit_mi_flush_bcs(ctx); |
1048 | 1047 | intel_batchbuffer_end_atomic_bcs(ctx); |
1049 | 1048 | intel_batchbuffer_flush_bcs(ctx); |
1050 | - | |
1051 | - dri_bo_map(i965_h264_context->avc_it_command_mb_info.bo, True); | |
1052 | - assert(i965_h264_context->avc_it_command_mb_info.bo->virtual); | |
1053 | - object_command = i965_h264_context->avc_it_command_mb_info.bo->virtual; | |
1054 | - memset(object_command, 0, i965_h264_context->avc_it_command_mb_info.mbs * i965_h264_context->use_avc_hw_scoreboard * MB_CMD_IN_BYTES); | |
1055 | - object_command += i965_h264_context->avc_it_command_mb_info.mbs * (1 + i965_h264_context->use_avc_hw_scoreboard) * MB_CMD_IN_DWS; | |
1056 | - *object_command = MI_BATCH_BUFFER_END; | |
1057 | - dri_bo_unmap(i965_h264_context->avc_it_command_mb_info.bo); | |
1058 | 1049 | } |
1059 | 1050 | |
1060 | 1051 | void |
@@ -517,7 +517,7 @@ i965_avc_ildb_objects(VADriverContextP ctx) | ||
517 | 517 | struct i965_h264_context *i965_h264_context = (struct i965_h264_context *)media_state->private_context; |
518 | 518 | struct i965_avc_ildb_context *avc_ildb_context = &i965_h264_context->avc_ildb_context; |
519 | 519 | |
520 | - BEGIN_BATCH(ctx, 4); | |
520 | + BEGIN_BATCH(ctx, 6); | |
521 | 521 | OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4); |
522 | 522 | |
523 | 523 | switch (avc_ildb_context->picture_type) { |
@@ -734,6 +734,7 @@ i965_media_h264_objects(VADriverContextP ctx, struct decode_state *decode_state) | ||
734 | 734 | object_command = i965_h264_context->avc_it_command_mb_info.bo->virtual; |
735 | 735 | memset(object_command, 0, i965_h264_context->avc_it_command_mb_info.mbs * i965_h264_context->use_avc_hw_scoreboard * MB_CMD_IN_BYTES); |
736 | 736 | object_command += i965_h264_context->avc_it_command_mb_info.mbs * (1 + i965_h264_context->use_avc_hw_scoreboard) * MB_CMD_IN_DWS; |
737 | + *object_command++ = 0; | |
737 | 738 | *object_command = MI_BATCH_BUFFER_END; |
738 | 739 | dri_bo_unmap(i965_h264_context->avc_it_command_mb_info.bo); |
739 | 740 |
@@ -867,7 +868,7 @@ i965_media_h264_decode_init(VADriverContextP ctx, struct decode_state *decode_st | ||
867 | 868 | dri_bo_unreference(i965_h264_context->avc_it_command_mb_info.bo); |
868 | 869 | bo = dri_bo_alloc(i965->intel.bufmgr, |
869 | 870 | "avc it command mb info", |
870 | - i965_h264_context->avc_it_command_mb_info.mbs * MB_CMD_IN_BYTES * (1 + i965_h264_context->use_avc_hw_scoreboard) + 4, | |
871 | + i965_h264_context->avc_it_command_mb_info.mbs * MB_CMD_IN_BYTES * (1 + i965_h264_context->use_avc_hw_scoreboard) + 8, | |
871 | 872 | 0x1000); |
872 | 873 | assert(bo); |
873 | 874 | i965_h264_context->avc_it_command_mb_info.bo = bo; |