Encoder: directly use the surface object of the input surface
[platform/upstream/libva-intel-driver.git] / src / gen7_mfc.c
index 759b10a..3abcacd 100644 (file)
@@ -1056,8 +1056,7 @@ gen7_mfc_mpeg2_prepare(VADriverContextP ctx,
     }
     
     /* input YUV surface */
-    obj_surface = SURFACE(encoder_context->input_yuv_surface);
-    assert(obj_surface && obj_surface->bo);
+    obj_surface = encode_state->input_yuv_object;
     mfc_context->uncompressed_picture_source.bo = obj_surface->bo;
     dri_bo_reference(mfc_context->uncompressed_picture_source.bo);