summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-08-11 16:44:31 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-10-28 11:37:35 +0100
commit524bbc1ba599b2b513eccc12d8e517a0fb3f328b (patch)
tree5a409ea4791cbc7ce8c7074fcd7f1807c3a4a227
parent77e8f4e2adc14319e23c8d1327782f35978335bd (diff)
vebox: fix invalid conversion and scaling params order.
The arguments to vpp_surface_convert() were mixed up. i.e. both input and output surfaces were reversed. Changed the vpp_surface_scaling() arguments order as well to have more consistent helper functions. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r--src/gen75_vpp_vebox.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gen75_vpp_vebox.c b/src/gen75_vpp_vebox.c
index effc24a..6312608 100644
--- a/src/gen75_vpp_vebox.c
+++ b/src/gen75_vpp_vebox.c
@@ -54,9 +54,9 @@ extern VAStatus
i965_DestroyImage(VADriverContextP ctx, VAImageID image);
-VAStatus vpp_surface_convert(VADriverContextP ctx,
- struct object_surface *src_obj_surf,
- struct object_surface *dst_obj_surf)
+VAStatus
+vpp_surface_convert(VADriverContextP ctx, struct object_surface *src_obj_surf,
+ struct object_surface *dst_obj_surf)
{
VAStatus va_status = VA_STATUS_SUCCESS;
@@ -86,9 +86,9 @@ VAStatus vpp_surface_convert(VADriverContextP ctx,
return va_status;
}
-VAStatus vpp_surface_scaling(VADriverContextP ctx,
- struct object_surface *dst_obj_surf,
- struct object_surface *src_obj_surf)
+static VAStatus
+vpp_surface_scaling(VADriverContextP ctx, struct object_surface *src_obj_surf,
+ struct object_surface *dst_obj_surf)
{
VAStatus va_status = VA_STATUS_SUCCESS;
int flags = I965_PP_FLAG_AVS;
@@ -1176,7 +1176,7 @@ int hsw_veb_pre_format_convert(VADriverContextP ctx,
}
}
- vpp_surface_convert(ctx, proc_ctx->surface_input_vebox_object, proc_ctx->surface_input_object);
+ vpp_surface_convert(ctx, proc_ctx->surface_input_object, proc_ctx->surface_input_vebox_object);
}
/* create one temporary NV12 surfaces for conversion*/
@@ -1247,7 +1247,7 @@ int hsw_veb_post_format_convert(VADriverContextP ctx,
if (proc_ctx->format_convert_flags & POST_COPY_CONVERT) {
/* copy the saved frame in the second call */
- vpp_surface_convert(ctx,proc_ctx->surface_output_object, obj_surface);
+ vpp_surface_convert(ctx, obj_surface, proc_ctx->surface_output_object);
} else if(!(proc_ctx->format_convert_flags & POST_FORMAT_CONVERT) &&
!(proc_ctx->format_convert_flags & POST_SCALING_CONVERT)){
/* Output surface format is covered by vebox pipeline and
@@ -1256,14 +1256,14 @@ int hsw_veb_post_format_convert(VADriverContextP ctx,
} else if ((proc_ctx->format_convert_flags & POST_FORMAT_CONVERT) &&
!(proc_ctx->format_convert_flags & POST_SCALING_CONVERT)){
/* convert and copy NV12 to YV12/IMC3/IMC2/RGBA output*/
- vpp_surface_convert(ctx,proc_ctx->surface_output_object, obj_surface);
+ vpp_surface_convert(ctx, obj_surface, proc_ctx->surface_output_object);
} else if(proc_ctx->format_convert_flags & POST_SCALING_CONVERT) {
/* scaling, convert and copy NV12 to YV12/IMC3/IMC2/RGBA output*/
assert(obj_surface->fourcc == VA_FOURCC_NV12);
/* first step :surface scaling */
- vpp_surface_scaling(ctx,proc_ctx->surface_output_scaled_object, obj_surface);
+ vpp_surface_scaling(ctx, obj_surface, proc_ctx->surface_output_scaled_object);
/* second step: color format convert and copy to output */
obj_surface = proc_ctx->surface_output_object;
@@ -1275,7 +1275,7 @@ int hsw_veb_post_format_convert(VADriverContextP ctx,
obj_surface->fourcc == VA_FOURCC_IMC1 ||
obj_surface->fourcc == VA_FOURCC_IMC3 ||
obj_surface->fourcc == VA_FOURCC_RGBA) {
- vpp_surface_convert(ctx, proc_ctx->surface_output_object, proc_ctx->surface_output_scaled_object);
+ vpp_surface_convert(ctx, proc_ctx->surface_output_scaled_object, obj_surface);
}else {
assert(0);
}