i965_drv_video: surface width/height is 16Btye aligned. 50/550/1
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 8 Apr 2010 07:46:16 +0000 (15:46 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 8 Apr 2010 07:52:11 +0000 (15:52 +0800)
i965_drv_video/i965_drv_video.c

index c902834..6ec4392 100644 (file)
@@ -364,9 +364,9 @@ i965_CreateSurfaces(VADriverContextP ctx,
         surfaces[i] = surfaceID;
         obj_surface->status = VASurfaceReady;
         obj_surface->subpic = VA_INVALID_ID;
-        obj_surface->width = width;
-        obj_surface->height = height;
-        obj_surface->size = SIZE_YUV420(width, height);
+        obj_surface->width = ALIGN(width, 16);
+        obj_surface->height = ALIGN(height, 16);
+        obj_surface->size = SIZE_YUV420(obj_surface->width, obj_surface->height);
         obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr,
                                        "vaapi surface",
                                        obj_surface->size,