From: Xiang, Haihao Date: Mon, 19 Apr 2010 06:41:31 +0000 (+0800) Subject: i965_drv_video: move AVC-ILDB data buffer to struct i965_h264_context X-Git-Tag: libva-1.0.3~3^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F561%2F1;p=profile%2Fivi%2Flibva.git i965_drv_video: move AVC-ILDB data buffer to struct i965_h264_context --- diff --git a/i965_drv_video/i965_avc_bsd.c b/i965_drv_video/i965_avc_bsd.c index d00fe7d..00a1675 100644 --- a/i965_drv_video/i965_avc_bsd.c +++ b/i965_drv_video/i965_avc_bsd.c @@ -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; } diff --git a/i965_drv_video/i965_avc_bsd.h b/i965_drv_video/i965_avc_bsd.h index 7f39ba5..a9db6d1 100644 --- a/i965_drv_video/i965_avc_bsd.h +++ b/i965_drv_video/i965_avc_bsd.h @@ -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 *); diff --git a/i965_drv_video/i965_media_h264.c b/i965_drv_video/i965_media_h264.c index fe8c219..ee8d7e7 100644 --- a/i965_drv_video/i965_media_h264.c +++ b/i965_drv_video/i965_media_h264.c @@ -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; } diff --git a/i965_drv_video/i965_media_h264.h b/i965_drv_video/i965_media_h264.h index 4df37a4..49204a1 100644 --- a/i965_drv_video/i965_media_h264.h +++ b/i965_drv_video/i965_media_h264.h @@ -26,6 +26,10 @@ struct i965_h264_context } avc_it_data; struct { + dri_bo *bo; + } avc_ildb_data; + + struct { unsigned int width_in_mbs; unsigned int height_in_mbs; int mbaff_frame_flag;