Update the size of DMV buffer for H.264 decoding on IVB
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 22 Feb 2013 05:56:04 +0000 (13:56 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 22 Feb 2013 06:06:56 +0000 (14:06 +0800)
It is at least width_in_mbs * align(height_in_mbs, 2) * 64.
Use width_in_mbs * (height_in_mbs + 1) * 64 in the driver.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59050
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 00f65b78e6de520a4820702207ce098c6b073724)

src/gen7_mfd.c

index 8421497..ae36fce 100755 (executable)
@@ -194,7 +194,7 @@ gen7_mfd_init_avc_surface(VADriverContextP ctx,
     if (gen7_avc_surface->dmv_top == NULL) {
         gen7_avc_surface->dmv_top = dri_bo_alloc(i965->intel.bufmgr,
                                                  "direct mv w/r buffer",
-                                                 width_in_mbs * height_in_mbs * 64,
+                                                 width_in_mbs * (height_in_mbs + 1) * 64,
                                                  0x1000);
         assert(gen7_avc_surface->dmv_top);
     }
@@ -203,7 +203,7 @@ gen7_mfd_init_avc_surface(VADriverContextP ctx,
         gen7_avc_surface->dmv_bottom == NULL) {
         gen7_avc_surface->dmv_bottom = dri_bo_alloc(i965->intel.bufmgr,
                                                     "direct mv w/r buffer",
-                                                    width_in_mbs * height_in_mbs * 64,                                                    
+                                                    width_in_mbs * (height_in_mbs + 1) * 64,
                                                     0x1000);
         assert(gen7_avc_surface->dmv_bottom);
     }