VPP: fix the check for DI filter flags on SNB/IVB
authorXiang, Haihao <haihao.xiang@intel.com>
Sun, 22 Sep 2013 05:03:42 +0000 (13:03 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 23 Sep 2013 07:02:22 +0000 (15:02 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit ea3c725a7f9fa66e7ef05e1c08af30c28f8c1aa0)

src/i965_post_processing.c

index e1b6032..536eb64 100755 (executable)
@@ -3215,14 +3215,10 @@ pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_contex
     int dndi_top_first = 1;
     VAProcFilterParameterBufferDeinterlacing *di_filter_param = (VAProcFilterParameterBufferDeinterlacing *)filter_param;
 
-    if (di_filter_param->flags == I965_SURFACE_FLAG_FRAME)
-        return VA_STATUS_ERROR_FLAG_NOT_SUPPORTED;
-
-    if (di_filter_param->flags == I965_SURFACE_FLAG_TOP_FIELD_FIRST) {
-        dndi_top_first = 1;
-    } else {
+    if (di_filter_param->flags & VA_DEINTERLACING_BOTTOM_FIELD_FIRST)
         dndi_top_first = 0;
-    }
+    else
+        dndi_top_first = 1;
 
     /* surface */
     obj_surface = (struct object_surface *)src_surface->base;
@@ -3621,14 +3617,10 @@ gen7_pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c
     VAProcFilterParameterBufferDeinterlacing *di_filter_param = (VAProcFilterParameterBufferDeinterlacing *)filter_param;
     int is_first_frame = (pp_dndi_context->frame_order == -1);
 
-    if (di_filter_param->flags == I965_SURFACE_FLAG_FRAME)
-        return VA_STATUS_ERROR_FLAG_NOT_SUPPORTED;
-
-    if (di_filter_param->flags == I965_SURFACE_FLAG_TOP_FIELD_FIRST) {
-        dndi_top_first = 1;
-    } else {
+    if (di_filter_param->flags & VA_DEINTERLACING_BOTTOM_FIELD_FIRST)
         dndi_top_first = 0;
-    }
+    else
+        dndi_top_first = 1;
 
     /* surface */
     current_in_obj_surface = (struct object_surface *)src_surface->base;