[Libva] [PATCH ] Fix inconsistent surface dimension during allocating surface buffer object
yakui.zhao at intel.com
yakui.zhao at intel.com
Tue Sep 18 07:00:32 PDT 2012
From: Zhao Yakui <yakui.zhao at intel.com>
When one surface is created, the height/width is aligned to 16 pixels.
But when trying to allocate the buffer object for it, the width is aligned
to 128 and height is aligned to 32. If the surface is mapped and accessed
before allocating the buffer object, the incorrect dimension is returned and
and the incorrect content is written.
From: Zhao Yakui <yakui.zhao at intel.com>
---
src/i965_drv_video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 588961f..8956367 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -506,8 +506,8 @@ i965_CreateSurfaces(VADriverContextP ctx,
obj_surface->orig_width = width;
obj_surface->orig_height = height;
- obj_surface->width = ALIGN(width, 16);
- obj_surface->height = ALIGN(height, 16);
+ obj_surface->width = ALIGN(width, 128);
+ obj_surface->height = ALIGN(height, 32);
obj_surface->flags = SURFACE_REFERENCED;
obj_surface->fourcc = 0;
obj_surface->bo = NULL;
--
1.7.12-rc1
More information about the Libva
mailing list