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>
Thu, 19 Jan 2012 08:28:37 +0000 (16:28 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/i965_drv_video.c

index de52bda..5562c9a 100644 (file)
@@ -2136,8 +2136,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);