From 1d135fe09b96cf0024cc490b6c377750bb146d23 Mon Sep 17 00:00:00 2001 From: "peng.chen" Date: Tue, 5 Jan 2016 01:54:03 +0800 Subject: [PATCH] revert some code for testing Signed-off-by: peng.chen --- src/i965_drv_video.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index 7b7bdf6..db82b27 100644 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -3819,22 +3819,22 @@ i965_check_alloc_surface_bo(VADriverContextP ctx, int bpp_1stplane = bpp_1stplane_by_fourcc(fourcc); - if (obj_surface->user_h_stride_set) { - ASSERT_RET(IS_ALIGNED(obj_surface->width, 128), VA_STATUS_ERROR_INVALID_PARAMETER); - } else - obj_surface->width = ALIGN(obj_surface->orig_width * bpp_1stplane, 128); - - if (obj_surface->user_v_stride_set) { - ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER); - } else - obj_surface->height = ALIGN(obj_surface->orig_height, 32); - if ((tiled && !obj_surface->user_disable_tiling)) { ASSERT_RET(fourcc != VA_FOURCC_I420 && fourcc != VA_FOURCC_IYUV && fourcc != VA_FOURCC_YV12, VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT); + if (obj_surface->user_h_stride_set) { + ASSERT_RET(IS_ALIGNED(obj_surface->width, 128), VA_STATUS_ERROR_INVALID_PARAMETER); + } else + obj_surface->width = ALIGN(obj_surface->orig_width * bpp_1stplane, 128); + + if (obj_surface->user_v_stride_set) { + ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER); + }else + obj_surface->height = ALIGN(obj_surface->orig_height, 32); + region_height = obj_surface->height; switch (fourcc) { -- 1.9.1