OSDN Git Service

Fix: check height alignment against hpitch
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 11 Apr 2017 12:03:34 +0000 (14:03 +0200)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 13 Apr 2017 03:08:33 +0000 (11:08 +0800)
Commit 43a75ea introduced a regression when importing dmabuf from v4l2,
returning VA_STATUS_ERROR_INVALID_PARAMETER.

This is because, when checking the check height alignment, the wpitch
was used, when hpitch is the one to compare.

Fixes #129

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
src/i965_drv_video.c

index 69be510..68275a2 100644 (file)
@@ -1479,7 +1479,7 @@ i965_suface_external_memory(VADriverContextP ctx,
         ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER);
     } else {
         ASSERT_RET(IS_ALIGNED(obj_surface->width, i965->codec_info->min_linear_wpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
-        ASSERT_RET(IS_ALIGNED(obj_surface->height, i965->codec_info->min_linear_wpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
+        ASSERT_RET(IS_ALIGNED(obj_surface->height, i965->codec_info->min_linear_hpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
     }
 
     obj_surface->x_cb_offset = 0; /* X offset is always 0 */