Fix y offset for Cb/Cr
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 19 Jan 2012 08:28:37 +0000 (16:28 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 7 Feb 2012 01:22:03 +0000 (09:22 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/i965_drv_video.c

index f4ff879..91dab20 100644 (file)
@@ -1798,8 +1798,8 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,
             region_height = obj_surface->height + ALIGN(obj_surface->cb_cr_height, 32) * 2;
 
             if (fourcc == VA_FOURCC('I', 'M', 'C', '1')) {
-                obj_surface->y_cb_offset = obj_surface->height;
-                obj_surface->y_cr_offset = obj_surface->y_cb_offset + ALIGN(obj_surface->cb_cr_height, 32);
+                obj_surface->y_cr_offset = obj_surface->height;
+                obj_surface->y_cb_offset = obj_surface->y_cr_offset + ALIGN(obj_surface->cb_cr_height, 32);
             } else {
                 obj_surface->y_cb_offset = obj_surface->height;
                 obj_surface->y_cr_offset = obj_surface->y_cb_offset + ALIGN(obj_surface->cb_cr_height, 32);