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-23 10:45:37 +0800
commit789046916bf50310e9dcb3882c53977eb2c0078e (patch)
tree512cb8e2caf69424078dc15851ff8c9c5ea14eee
parentecb50e50fd0abcc80f2518f9d36a7e7f7f3b8a94 (diff)
downloadlibva-intel-driver-789046916bf50310e9dcb3882c53977eb2c0078e.tar.gz
libva-intel-driver-789046916bf50310e9dcb3882c53977eb2c0078e.tar.bz2
libva-intel-driver-789046916bf50310e9dcb3882c53977eb2c0078e.zip
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> (cherry picked from commit 8a0a61ce47e086ac156602c3daaf70f20e4ca222)
-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 b2fa23c..e1b6032 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -3639,13 +3639,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,