diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2016-08-10 12:30:13 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2016-08-10 12:36:56 +0800 |
commit | 5a30370b22f0937f64d5935621e66561adc48ae0 (patch) | |
tree | 4b5e509b2f4c2bc94340b2d4b2e35a73a40ab1b2 | |
parent | 4f8d4b211b4f90ef26c356b8028c5435cd685952 (diff) |
V1->V2: Use the ASSERT_RET for the debug purpose
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
-rw-r--r-- | src/gen75_vpp_vebox.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/gen75_vpp_vebox.c b/src/gen75_vpp_vebox.c index 2bc5cf9..91715fc 100644 --- a/src/gen75_vpp_vebox.c +++ b/src/gen75_vpp_vebox.c @@ -1367,7 +1367,7 @@ gen75_vebox_ensure_surfaces(VADriverContextP ctx, return VA_STATUS_SUCCESS; } -int hsw_veb_pre_format_convert(VADriverContextP ctx, +VAStatus hsw_veb_pre_format_convert(VADriverContextP ctx, struct intel_vebox_context *proc_ctx) { VAStatus va_status; @@ -1381,11 +1381,11 @@ int hsw_veb_pre_format_convert(VADriverContextP ctx, if ((obj_surf_input == NULL) && (proc_ctx->pipeline_param->surface_region == NULL)) - assert(0); + ASSERT_RET(0, VA_STATUS_ERROR_INVALID_PARAMETER); if ((obj_surf_output == NULL) && (proc_ctx->pipeline_param->output_region == NULL)) - assert(0); + ASSERT_RET(0, VA_STATUS_ERROR_INVALID_PARAMETER); if (proc_ctx->pipeline_param->surface_region) { proc_ctx->width_input = proc_ctx->pipeline_param->surface_region->width; @@ -1434,7 +1434,7 @@ int hsw_veb_pre_format_convert(VADriverContextP ctx, // nothing to do here } else { /* not support other format as input */ - assert(0); + ASSERT_RET(0, VA_STATUS_ERROR_UNIMPLEMENTED); } if (proc_ctx->format_convert_flags & PRE_FORMAT_CONVERT) { @@ -1474,8 +1474,8 @@ int hsw_veb_pre_format_convert(VADriverContextP ctx, /* Nothing to do here */ } else { - /* not support other format as input */ - assert(0); + /* not support other format as input */ + ASSERT_RET(0, VA_STATUS_ERROR_UNIMPLEMENTED); } if(proc_ctx->format_convert_flags & POST_FORMAT_CONVERT || @@ -1517,7 +1517,7 @@ int hsw_veb_pre_format_convert(VADriverContextP ctx, } } - return 0; + return VA_STATUS_SUCCESS; } VAStatus @@ -1701,7 +1701,9 @@ gen75_vebox_process_picture(VADriverContextP ctx, if (status != VA_STATUS_SUCCESS) return status; - hsw_veb_pre_format_convert(ctx, proc_ctx); + status = hsw_veb_pre_format_convert(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + return status; status = gen75_vebox_ensure_surfaces(ctx, proc_ctx); if (status != VA_STATUS_SUCCESS) @@ -1931,7 +1933,9 @@ gen8_vebox_process_picture(VADriverContextP ctx, if (status != VA_STATUS_SUCCESS) return status; - hsw_veb_pre_format_convert(ctx, proc_ctx); + status = hsw_veb_pre_format_convert(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + return status; status = gen75_vebox_ensure_surfaces(ctx, proc_ctx); if (status != VA_STATUS_SUCCESS) @@ -2400,7 +2404,9 @@ gen9_vebox_process_picture(VADriverContextP ctx, if (status != VA_STATUS_SUCCESS) return status; - hsw_veb_pre_format_convert(ctx, proc_ctx); + status = hsw_veb_pre_format_convert(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + return status; status = gen75_vebox_ensure_surfaces(ctx, proc_ctx); if (status != VA_STATUS_SUCCESS) |