From e6aff72b1674cf194ed9ea0caf8f37824c432e78 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 27 Nov 2012 15:49:24 +0800 Subject: rename I965_CODEDBUFFER_SIZE Signed-off-by: Xiang, Haihao --- src/gen6_mfc_common.c | 2 +- src/gen75_mfc.c | 2 +- src/i965_drv_video.c | 10 +++++----- src/i965_drv_video.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c index af53219..fc62de2 100644 --- a/src/gen6_mfc_common.c +++ b/src/gen6_mfc_common.c @@ -625,7 +625,7 @@ VAStatus intel_mfc_avc_prepare(VADriverContextP ctx, bo = obj_buffer->buffer_store->bo; assert(bo); mfc_context->mfc_indirect_pak_bse_object.bo = bo; - mfc_context->mfc_indirect_pak_bse_object.offset = I965_CODEDBUFFER_SIZE; + mfc_context->mfc_indirect_pak_bse_object.offset = I965_CODEDBUFFER_HEADER_SIZE; mfc_context->mfc_indirect_pak_bse_object.end_offset = ALIGN(obj_buffer->size_element - 0x1000, 0x1000); dri_bo_reference(mfc_context->mfc_indirect_pak_bse_object.bo); diff --git a/src/gen75_mfc.c b/src/gen75_mfc.c index 47741a9..7ba653f 100644 --- a/src/gen75_mfc.c +++ b/src/gen75_mfc.c @@ -2309,7 +2309,7 @@ intel_mfc_mpeg2_prepare(VADriverContextP ctx, bo = obj_buffer->buffer_store->bo; assert(bo); mfc_context->mfc_indirect_pak_bse_object.bo = bo; - mfc_context->mfc_indirect_pak_bse_object.offset = I965_CODEDBUFFER_SIZE; + mfc_context->mfc_indirect_pak_bse_object.offset = I965_CODEDBUFFER_HEADER_SIZE; mfc_context->mfc_indirect_pak_bse_object.end_offset = ALIGN(obj_buffer->size_element - 0x1000, 0x1000); dri_bo_reference(mfc_context->mfc_indirect_pak_bse_object.bo); diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index 4e06021..86a4937 100755 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -1331,7 +1331,7 @@ i965_create_buffer_internal(VADriverContextP ctx, } if (type == VAEncCodedBufferType) { - size += I965_CODEDBUFFER_SIZE; + size += I965_CODEDBUFFER_HEADER_SIZE; size += 0x1000; /* for upper bound check */ } @@ -1363,7 +1363,7 @@ i965_create_buffer_internal(VADriverContextP ctx, unsigned char *flag = NULL; dri_bo_map(buffer_store->bo, 1); coded_buffer_segment = (VACodedBufferSegment *)buffer_store->bo->virtual; - coded_buffer_segment->size = size - I965_CODEDBUFFER_SIZE; + coded_buffer_segment->size = size - I965_CODEDBUFFER_HEADER_SIZE; coded_buffer_segment->bit_offset = 0; coded_buffer_segment->status = 0; coded_buffer_segment->buf = NULL; @@ -1467,9 +1467,9 @@ i965_MapBuffer(VADriverContextP ctx, unsigned char *flag = (unsigned char *)(coded_buffer_segment + 1); if (*flag != 1) { - coded_buffer_segment->buf = buffer = (unsigned char *)(obj_buffer->buffer_store->bo->virtual) + I965_CODEDBUFFER_SIZE; + coded_buffer_segment->buf = buffer = (unsigned char *)(obj_buffer->buffer_store->bo->virtual) + I965_CODEDBUFFER_HEADER_SIZE; - for (i = 0; i < obj_buffer->size_element - I965_CODEDBUFFER_SIZE - 3 - 0x1000; i++) { + for (i = 0; i < obj_buffer->size_element - I965_CODEDBUFFER_HEADER_SIZE - 3 - 0x1000; i++) { if (!buffer[i] && !buffer[i + 1] && !buffer[i + 2] && @@ -1478,7 +1478,7 @@ i965_MapBuffer(VADriverContextP ctx, break; } - if (i == obj_buffer->size_element - I965_CODEDBUFFER_SIZE - 3 - 0x1000) { + if (i == obj_buffer->size_element - I965_CODEDBUFFER_HEADER_SIZE - 3 - 0x1000) { coded_buffer_segment->status |= VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK; } diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h index 46c1488..b4ad5f2 100644 --- a/src/i965_drv_video.h +++ b/src/i965_drv_video.h @@ -341,7 +341,7 @@ int va_enc_packed_type_to_idx(int packed_type); /* reserve 1 byte for internal using */ -#define I965_CODEDBUFFER_SIZE ALIGN(sizeof(VACodedBufferSegment) + 1, 64) +#define I965_CODEDBUFFER_HEADER_SIZE ALIGN(sizeof(VACodedBufferSegment) + 1, 64) extern VAStatus i965_MapBuffer(VADriverContextP ctx, -- cgit v1.2.3