summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-09-13 15:47:50 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-09-13 15:50:16 +0800
commit8a0a61ce47e086ac156602c3daaf70f20e4ca222 (patch)
treedc7820974e1e84b3090eeea175399c53cd69f9c3
parent219452451ede9d52d8940be55cd38feda50baea7 (diff)
VPP: Remove an assert on forward temporal reference on IVB
Add a warning and return VA_STATUS_ERROR_INVALID_PARAMETER instead Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rwxr-xr-xsrc/i965_post_processing.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index d7768ae..a26bd2f 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -3709,13 +3709,18 @@ gen7_pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c
} else if (di_filter_param->algorithm == VAProcDeinterlacingMotionAdaptive) {
if (pp_dndi_context->frame_order == 0) {
VAProcPipelineParameterBuffer *pipeline_param = pp_context->pipeline_param;
- assert(pipeline_param->num_forward_references == 1);
- assert(pipeline_param->forward_references[0] != VA_INVALID_ID);
+ if (!pipeline_param ||
+ !pipeline_param->num_forward_references ||
+ pipeline_param->forward_references[0] == VA_INVALID_ID) {
+ WARN_ONCE("A forward temporal reference is needed for Motion adaptive deinterlacing !!!\n");
- previous_in_obj_surface = SURFACE(pipeline_param->forward_references[0]);
- assert(previous_in_obj_surface && previous_in_obj_surface->bo);
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
+ } else {
+ previous_in_obj_surface = SURFACE(pipeline_param->forward_references[0]);
+ assert(previous_in_obj_surface && previous_in_obj_surface->bo);
- is_first_frame = 0;
+ is_first_frame = 0;
+ }
} else if (pp_dndi_context->frame_order == 1) {
vpp_surface_convert(ctx,
pp_dndi_context->current_out_obj_surface,