[Libva] [libva-intel-driver PATCH] Silence compiler warning
Xiang, Haihao
haihao.xiang at intel.com
Mon Sep 14 19:16:45 PDT 2015
Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
src/gen75_vpp_gpe.c | 30 ++----------------------------
src/gen7_vme.c | 4 ++--
src/gen9_mfc_hevc.c | 4 ----
src/i965_drv_video.c | 4 ----
src/i965_gpe_utils.c | 5 +----
src/i965_post_processing.c | 2 --
6 files changed, 5 insertions(+), 44 deletions(-)
diff --git a/src/gen75_vpp_gpe.c b/src/gen75_vpp_gpe.c
index 118a544..5486128 100644
--- a/src/gen75_vpp_gpe.c
+++ b/src/gen75_vpp_gpe.c
@@ -208,20 +208,6 @@ gen75_gpe_process_interface_setup(VADriverContextP ctx,
}
static VAStatus
-gen75_gpe_process_constant_fill(VADriverContextP ctx,
- struct vpp_gpe_context *vpp_gpe_ctx)
-{
- dri_bo_map(vpp_gpe_ctx->gpe_ctx.curbe.bo, 1);
- assert(vpp_gpe_ctx->gpe_ctx.curbe.bo->virtual);
- unsigned char* constant_buffer = vpp_gpe_ctx->gpe_ctx.curbe.bo->virtual;
- memcpy(constant_buffer, vpp_gpe_ctx->kernel_param,
- vpp_gpe_ctx->kernel_param_size);
- dri_bo_unmap(vpp_gpe_ctx->gpe_ctx.curbe.bo);
-
- return VA_STATUS_SUCCESS;
-}
-
-static VAStatus
gen75_gpe_process_parameters_fill(VADriverContextP ctx,
struct vpp_gpe_context *vpp_gpe_ctx)
{
@@ -444,20 +430,6 @@ gen8_gpe_process_interface_setup(VADriverContextP ctx,
}
static VAStatus
-gen8_gpe_process_constant_fill(VADriverContextP ctx,
- struct vpp_gpe_context *vpp_gpe_ctx)
-{
- dri_bo_map(vpp_gpe_ctx->gpe_ctx.dynamic_state.bo, 1);
- assert(vpp_gpe_ctx->gpe_ctx.dynamic_state.bo->virtual);
- unsigned char* constant_buffer = vpp_gpe_ctx->gpe_ctx.dynamic_state.bo->virtual;
- memcpy(constant_buffer, vpp_gpe_ctx->kernel_param,
- vpp_gpe_ctx->kernel_param_size);
- dri_bo_unmap(vpp_gpe_ctx->gpe_ctx.dynamic_state.bo);
-
- return VA_STATUS_SUCCESS;
-}
-
-static VAStatus
gen8_gpe_process_parameters_fill(VADriverContextP ctx,
struct vpp_gpe_context *vpp_gpe_ctx)
{
@@ -651,6 +623,8 @@ vpp_gpe_process_sharpening(VADriverContextP ctx,
else if (IS_GEN8(i965->intel.device_info) ||
IS_GEN9(i965->intel.device_info)) // TODO: build the sharpening kernel for GEN9
vpp_kernels = gen8_vpp_sharpening_kernels;
+ else
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
vpp_gpe_ctx->gpe_load_kernels(ctx,
&vpp_gpe_ctx->gpe_ctx,
diff --git a/src/gen7_vme.c b/src/gen7_vme.c
index 156e0d3..9da44d1 100644
--- a/src/gen7_vme.c
+++ b/src/gen7_vme.c
@@ -379,8 +379,8 @@ static VAStatus gen7_vme_avc_state_setup(VADriverContextP ctx,
vme_state_message = (unsigned int *)vme_context->vme_state.bo->virtual;
if (((slice_param->slice_type == SLICE_TYPE_P) ||
- (slice_param->slice_type == SLICE_TYPE_SP) &&
- !is_low_quality)) {
+ (slice_param->slice_type == SLICE_TYPE_SP)) &&
+ !is_low_quality) {
vme_state_message[0] = 0x01010101;
vme_state_message[1] = 0x10010101;
vme_state_message[2] = 0x0F0F0F0F;
diff --git a/src/gen9_mfc_hevc.c b/src/gen9_mfc_hevc.c
index 272479e..46f8c59 100644
--- a/src/gen9_mfc_hevc.c
+++ b/src/gen9_mfc_hevc.c
@@ -719,9 +719,6 @@ gen9_hcpe_hevc_slice_state(VADriverContextP ctx,
struct intel_encoder_context *encoder_context,
struct intel_batchbuffer *batch)
{
- /* to do */
- struct gen9_hcpe_context *mfc_context = encoder_context->mfc_context;
-
VAEncSequenceParameterBufferHEVC *pSequenceParameter = (VAEncSequenceParameterBufferHEVC *)encode_state->seq_param_ext->buffer;
int slice_type = slice_param->slice_type;
@@ -1591,7 +1588,6 @@ gen9_hcpe_hevc_pipeline_slice_programing(VADriverContextP ctx,
int height_in_ctb = (pSequenceParameter->pic_height_in_luma_samples + ctb_size - 1) / ctb_size;
int last_slice = (pSliceParameter->slice_segment_address + pSliceParameter->num_ctu_in_slice) == (width_in_ctb * height_in_ctb);
int ctb_width_in_mb = (ctb_size + 15) / 16;
- int num_mb_in_ctb = ctb_width_in_mb * ctb_width_in_mb;
int i_ctb, ctb_x, ctb_y;
unsigned int split_coding_unit_flag = 0;
int width_in_mbs = (pSequenceParameter->pic_width_in_luma_samples + 15) / 16;
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index d990691..9bbd67f 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1993,7 +1993,6 @@ i965_CreateContext(VADriverContextP ctx,
VAContextID *context) /* out */
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct i965_render_state *render_state = &i965->render_state;
struct object_config *obj_config = CONFIG(config_id);
struct object_context *obj_context = NULL;
VAConfigAttrib *attrib;
@@ -4413,8 +4412,6 @@ i965_sw_getimage(VADriverContextP ctx,
struct object_surface *obj_surface, struct object_image *obj_image,
const VARectangle *rect)
{
- struct i965_driver_data * const i965 = i965_driver_data(ctx);
- struct i965_render_state *render_state = &i965->render_state;
void *image_data = NULL;
VAStatus va_status;
@@ -4438,7 +4435,6 @@ i965_sw_getimage(VADriverContextP ctx,
get_image_yuy2(obj_image, image_data, obj_surface, rect);
break;
default:
- operation_failed:
va_status = VA_STATUS_ERROR_OPERATION_FAILED;
break;
}
diff --git a/src/i965_gpe_utils.c b/src/i965_gpe_utils.c
index 6d3b3ab..b9bf99b 100644
--- a/src/i965_gpe_utils.c
+++ b/src/i965_gpe_utils.c
@@ -808,13 +808,12 @@ gen8_gpe_set_media_chroma_surface_state(VADriverContextP ctx,
struct object_surface *obj_surface,
struct gen8_surface_state *ss)
{
- int w, h, w_pitch;
+ int w, w_pitch;
unsigned int tiling, swizzle;
int cbcr_offset;
dri_bo_get_tiling(obj_surface->bo, &tiling, &swizzle);
w = obj_surface->orig_width;
- h = obj_surface->orig_height;
w_pitch = obj_surface->width;
cbcr_offset = obj_surface->height * obj_surface->width;
@@ -1131,8 +1130,6 @@ gen8_gpe_context_init(VADriverContextP ctx,
void
gen8_gpe_context_destroy(struct i965_gpe_context *gpe_context)
{
- int i;
-
dri_bo_unreference(gpe_context->surface_state_binding_table.bo);
gpe_context->surface_state_binding_table.bo = NULL;
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index 491234b..82162cb 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -4942,8 +4942,6 @@ i965_post_processing(
pp_context->filter_flags = va_flags;
if (avs_is_needed(va_flags)) {
VARectangle tmp_dst_rect;
- struct i965_render_state *render_state = &i965->render_state;
- struct intel_region *dest_region = render_state->draw_region;
if (out_surface_id != VA_INVALID_ID)
tmp_id = out_surface_id;
--
1.9.1
More information about the Libva
mailing list