summaryrefslogtreecommitdiff
path: root/src/psb_VC1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psb_VC1.c')
-rw-r--r--src/psb_VC1.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/psb_VC1.c b/src/psb_VC1.c
index 80a6d05..98a8010 100644
--- a/src/psb_VC1.c
+++ b/src/psb_VC1.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2011 Intel Corporation. All Rights Reserved.
- * Copyright (c) Imagination Technologies Limited, UK
+ * Copyright (c) Imagination Technologies Limited, UK
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -56,6 +56,8 @@
#define SET_SURFACE_INFO_picture_coding_type(psb_surface, val) psb_surface->extra_info[2] = (uint32_t) val;
#define GET_SURFACE_INFO_colocated_index(psb_surface) ((int) (psb_surface->extra_info[3]))
#define SET_SURFACE_INFO_colocated_index(psb_surface, val) psb_surface->extra_info[3] = (uint32_t) val;
+#define SET_SURFACE_INFO_rotate(psb_surface, rotate) psb_surface->extra_info[5] = (uint32_t) rotate;
+#define GET_SURFACE_INFO_rotate(psb_surface) ((int) psb_surface->extra_info[5])
#define SLICEDATA_BUFFER_TYPE(type) ((type==VASliceDataBufferType)?"VASliceDataBufferType":"VAProtectedSliceDataBufferType")
@@ -501,8 +503,8 @@ static VAStatus psb_VC1_CreateContext(
}
if (vaStatus == VA_STATUS_SUCCESS) {
void *vlc_packed_data_address;
- if (0 == psb_buffer_map(&ctx->vlc_packed_table, &vlc_packed_data_address)) {
- psb__VC1_pack_vlc_tables(vlc_packed_data_address, gaui16vc1VlcTableData, gui16vc1VlcTableSize);
+ if (0 == psb_buffer_map(&ctx->vlc_packed_table, (unsigned char **)&vlc_packed_data_address)) {
+ psb__VC1_pack_vlc_tables((unsigned short *)vlc_packed_data_address, gaui16vc1VlcTableData, gui16vc1VlcTableSize);
psb_buffer_unmap(&ctx->vlc_packed_table);
psb__VC1_pack_index_table_info(ctx->vlc_packed_index_table, gaui16vc1VlcIndexData);
} else {
@@ -1285,7 +1287,7 @@ static VAStatus psb__VC1_add_slice_param(context_VC1_p ctx, object_buffer_p obj_
{
ASSERT(obj_buffer->type == VASliceParameterBufferType);
if (ctx->slice_param_list_idx >= ctx->slice_param_list_size) {
- void *new_list;
+ unsigned char *new_list;
ctx->slice_param_list_size += 8;
new_list = realloc(ctx->slice_param_list,
sizeof(object_buffer_p) * ctx->slice_param_list_size);
@@ -1809,7 +1811,7 @@ static void psb__VC1_setup_alternative_frame(context_VC1_p ctx)
psb_surface_p rotate_surface = ctx->obj_context->current_render_target->psb_surface_rotate;
object_context_p obj_context = ctx->obj_context;
- if (rotate_surface->extra_info[5] != obj_context->rotate)
+ if (GET_SURFACE_INFO_rotate(rotate_surface) != obj_context->msvdx_rotate)
psb__error_message("Display rotate mode does not match surface rotate mode!\n");
@@ -1827,7 +1829,7 @@ static void psb__VC1_setup_alternative_frame(context_VC1_p ctx)
REGIO_WRITE_FIELD_LITE(cmd, MSVDX_CMDS, ALTERNATIVE_OUTPUT_PICTURE_ROTATION , ALT_PICTURE_ENABLE, 1);
REGIO_WRITE_FIELD_LITE(cmd, MSVDX_CMDS, ALTERNATIVE_OUTPUT_PICTURE_ROTATION , ROTATION_ROW_STRIDE, rotate_surface->stride_mode);
REGIO_WRITE_FIELD_LITE(cmd, MSVDX_CMDS, ALTERNATIVE_OUTPUT_PICTURE_ROTATION , RECON_WRITE_DISABLE, 0); /* FIXME Always generate Rec */
- REGIO_WRITE_FIELD_LITE(cmd, MSVDX_CMDS, ALTERNATIVE_OUTPUT_PICTURE_ROTATION , ROTATION_MODE, rotate_surface->extra_info[5]);
+ REGIO_WRITE_FIELD_LITE(cmd, MSVDX_CMDS, ALTERNATIVE_OUTPUT_PICTURE_ROTATION , ROTATION_MODE, GET_SURFACE_INFO_rotate(rotate_surface));
psb_cmdbuf_rendec_write(cmdbuf, cmd);
@@ -1950,7 +1952,7 @@ static void psb__VC1_send_rendec_params(context_VC1_p ctx, VASliceParameterBuffe
psb_cmdbuf_rendec_start_block(cmdbuf);
- if (ctx->obj_context->rotate != VA_ROTATION_NONE) /* FIXME field coded should not issue */
+ if (CONTEXT_ROTATE(ctx->obj_context)) /* FIXME field coded should not issue */
psb__VC1_setup_alternative_frame(ctx);
/* CHUNK: 1 - VC1SEQUENCE00 */
@@ -2595,7 +2597,7 @@ static VAStatus psb__VC1_process_slice_data(context_VC1_p ctx, object_buffer_p o
VAStatus vaStatus = VA_STATUS_SUCCESS;
VASliceParameterBufferVC1 *slice_param;
int buffer_idx = 0;
- int element_idx = 0;
+ unsigned int element_idx = 0;
ASSERT((obj_buffer->type == VASliceDataBufferType) || (obj_buffer->type == VAProtectedSliceDataBufferType));